diff options
author | Guido van Rossum <guido@python.org> | 2007-04-13 18:42:35 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-04-13 18:42:35 (GMT) |
commit | 13633bb8c5bd2dbd2b9955539495ac6fb632776c (patch) | |
tree | ec0bc79cb915802f9e32b371b6b2cffdbfd4e52e /Lib/test/test_bytes.py | |
parent | 913dd0be52f28fbc5036d95722b80222880706fd (diff) | |
download | cpython-13633bb8c5bd2dbd2b9955539495ac6fb632776c.zip cpython-13633bb8c5bd2dbd2b9955539495ac6fb632776c.tar.gz cpython-13633bb8c5bd2dbd2b9955539495ac6fb632776c.tar.bz2 |
Support name and mode attributes on all file types.
Don't read more than one line when reading text from a tty device.
Add peek() and read1() methods.
Return str instead of unicode when return ASCII characters in text mode.
Diffstat (limited to 'Lib/test/test_bytes.py')
-rw-r--r-- | Lib/test/test_bytes.py | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/Lib/test/test_bytes.py b/Lib/test/test_bytes.py index 999346f..e0bb21e 100644 --- a/Lib/test/test_bytes.py +++ b/Lib/test/test_bytes.py @@ -163,14 +163,7 @@ class BytesTest(unittest.TestCase): f.write(b) with open(tfn, "rb") as f: self.assertEqual(f.read(), sample) - # Test writing in text mode - with open(tfn, "w") as f: - f.write(b) - with open(tfn, "r") as f: - self.assertEqual(f.read(), sample) - # Can't use readinto in text mode - with open(tfn, "r") as f: - self.assertRaises(TypeError, f.readinto, b) + # Text mode is ambiguous; don't test finally: try: os.remove(tfn) |