8000 bpo-37964: Make sure test works if TESTFN is in a non-ASCII directory… · python/cpython@465e5d5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 465e5d5

Browse files
authored
bpo-37964: Make sure test works if TESTFN is in a non-ASCII directory. (GH-15568)
1 parent b0caf32 commit 465e5d5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Lib/test/test_fcntl.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@ def test_flock_overflow(self):
147147
@unittest.skipIf(sys.platform != 'darwin', "F_GETPATH is only available on macos")
148148
def test_fcntl_f_getpath(self):
149149
self.f = open(TESTFN, 'wb')
150-
abspath = os.path.abspath(TESTFN)
151-
res = fcntl.fcntl(self.f.fileno(), fcntl.F_GETPATH, bytes(len(abspath)))
152-
self.assertEqual(abspath, res.decode('utf-8'))
150+
expected = os.path.abspath(TESTFN).encode('utf-8')
151+
res = fcntl.fcntl(self.f.fileno(), fcntl.F_GETPATH, bytes(len(expected)))
152+
self.assertEqual(expected, res)
153153

154154
def test_main():
155155
run_unittest(TestFcntl)

0 commit comments

Comments
 (0)
0