diff options
author | Guido van Rossum <guido@python.org> | 2007-08-27 18:31:48 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-08-27 18:31:48 (GMT) |
commit | 9c62772d5e0e096458c6f5c8e50cc84fcc1383f7 (patch) | |
tree | 088d8c2701cf01ed6e516d83aff3182de9cb555d /Lib/test/test_univnewlines.py | |
parent | 35d9428046e74cd9c36fb4507ca048dad32097cc (diff) | |
download | cpython-9c62772d5e0e096458c6f5c8e50cc84fcc1383f7.zip cpython-9c62772d5e0e096458c6f5c8e50cc84fcc1383f7.tar.gz cpython-9c62772d5e0e096458c6f5c8e50cc84fcc1383f7.tar.bz2 |
Changes in anticipation of stricter str vs. bytes enforcement.
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): |