diff options
Diffstat (limited to 'Lib/test/test_fcntl.py')
-rw-r--r-- | Lib/test/test_fcntl.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_fcntl.py b/Lib/test/test_fcntl.py index e8eeaaa7bf..6c64b82b31 100644 --- a/Lib/test/test_fcntl.py +++ b/Lib/test/test_fcntl.py @@ -62,7 +62,7 @@ class TestFcntl(unittest.TestCase): def test_fcntl_fileno(self): # the example from the library docs - self.f = open(TESTFN, 'w') + self.f = open(TESTFN, 'wb') rv = fcntl.fcntl(self.f.fileno(), fcntl.F_SETFL, os.O_NONBLOCK) if verbose: print('Status from fcntl with O_NONBLOCK: ', rv) @@ -74,7 +74,7 @@ class TestFcntl(unittest.TestCase): def test_fcntl_file_descriptor(self): # again, but pass the file rather than numeric descriptor - self.f = open(TESTFN, 'w') + self.f = open(TESTFN, 'wb') rv = fcntl.fcntl(self.f, fcntl.F_SETFL, os.O_NONBLOCK) if sys.platform not in ['os2emx']: rv = fcntl.fcntl(self.f, fcntl.F_SETLKW, lockdata) |