Skip to content

Commit bb7abe5

Browse files
committed
Fix tests, attempt python#2
1 parent f6f0e35 commit bb7abe5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Lib/test/test_unittest/test_program.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -447,8 +447,8 @@ def _join(name):
447447

448448
def testParseArgsAbsolutePathsThatCannotBeConverted(self):
449449
program = self.program
450-
# '//...' is considered absolute by os.path.abspath on all platforms.
451-
argv = ['progname', '//foo/bar/baz.py', '//green/red.py']
450+
drive = os.path.splitdrive(os.getcwd())[0]
451+
argv = ['progname', f'{drive}/foo/bar/baz.py', f'{drive}/green/red.py']
452452
self._patch_isfile(argv)
453453

454454
program.createTests = lambda: None

Lib/test/test_zoneinfo/test_zoneinfo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1730,7 +1730,7 @@ def test_env_variable_relative_paths(self):
17301730
def test_reset_tzpath_kwarg(self):
17311731
self.module.reset_tzpath(to=[f"{DRIVE}/a/b/c"])
17321732

1733-
self.assertSequenceEqual(self.module.TZPATH, ("/a/b/c",))
1733+
self.assertSequenceEqual(self.module.TZPATH, (f"{DRIVE}/a/b/c",))
17341734

17351735
def test_reset_tzpath_relative_paths(self):
17361736
bad_values = [

0 commit comments

Comments
 (0)