Ask for the entry point by its parts, not by a slash

The assertion spelled the path with a forward slash, which is not the separator
Windows joins with. The Windows job this branch adds is the first to run it
there.
This commit is contained in:
2026-08-16 14:13:12 +03:00
parent b186f7fde2
commit bac988e0e6
+5 -1
View File
@@ -7,6 +7,7 @@ answers by saying nothing at all.
import json import json
import os import os
import pathlib
import sys import sys
import unittest import unittest
from unittest import mock from unittest import mock
@@ -57,7 +58,10 @@ class FakeSocket:
class Paths(unittest.TestCase): class Paths(unittest.TestCase):
def test_script_path_points_at_dikte(self): def test_script_path_points_at_dikte(self):
self.assertTrue(ipc.script_path().endswith("dikte/__main__.py")) # By its parts rather than as a string: the separator is a backslash on
# Windows, and the path is what a shortcut there runs too.
path = pathlib.Path(ipc.script_path())
self.assertEqual(path.parts[-2:], ("dikte", "__main__.py"))
self.assertTrue(os.path.exists(ipc.script_path())) self.assertTrue(os.path.exists(ipc.script_path()))
def test_the_shortcut_command_runs_it_with_this_interpreter(self): def test_the_shortcut_command_runs_it_with_this_interpreter(self):