summaryrefslogtreecommitdiff
path: root/Lib/test
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_bytes.py9
-rw-r--r--Lib/test/test_fileio.py1
2 files changed, 2 insertions, 8 deletions
diff --git a/Lib/test/test_bytes.py b/Lib/test/test_bytes.py
index 999346f3b1..e0bb21e063 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)
diff --git a/Lib/test/test_fileio.py b/Lib/test/test_fileio.py
index 6a78154335..bb98190af7 100644
--- a/Lib/test/test_fileio.py
+++ b/Lib/test/test_fileio.py
@@ -51,6 +51,7 @@ class AutoFileTests(unittest.TestCase):
self.assertEquals(f.mode, "w")
self.assertEquals(f.closed, False)
+ self.assertEquals(f.name, TESTFN)
# verify the attributes are readonly
for attr in 'mode', 'closed':