diff options
Diffstat (limited to 'Lib/test/test_univnewlines.py')
-rw-r--r-- | Lib/test/test_univnewlines.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_univnewlines.py b/Lib/test/test_univnewlines.py index 350bad3..4ca1a27 100644 --- a/Lib/test/test_univnewlines.py +++ b/Lib/test/test_univnewlines.py @@ -36,7 +36,10 @@ class TestGenericUnivNewlines(unittest.TestCase): def setUp(self): fp = open(test_support.TESTFN, self.WRITEMODE) - fp.write(self.DATA) + data = self.DATA + if "b" in self.WRITEMODE: + data = data.encode("ascii") + fp.write(data) fp.close() def tearDown(self): |