summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_bz2.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-06-13 01:46:31 (GMT)
committerGuido van Rossum <guido@python.org>2007-06-13 01:46:31 (GMT)
commit88e860c00584b74168ca486379dd04c07ed22fc4 (patch)
treeca9550adf3d0cf2a60b2e2568f06210e451191cb /Lib/test/test_bz2.py
parent755114a22aa9e55288b379c097ceecdc5a72b84b (diff)
downloadcpython-88e860c00584b74168ca486379dd04c07ed22fc4.zip
cpython-88e860c00584b74168ca486379dd04c07ed22fc4.tar.gz
cpython-88e860c00584b74168ca486379dd04c07ed22fc4.tar.bz2
Fix bz2_test.py by removing the tests for universal newline mode.
If you want text support, wrap a TextIOWrapper around it. Remove references to universal newlines from the BZ2File docstring.
Diffstat (limited to 'Lib/test/test_bz2.py')
-rw-r--r--Lib/test/test_bz2.py26
1 files changed, 0 insertions, 26 deletions
diff --git a/Lib/test/test_bz2.py b/Lib/test/test_bz2.py
index be871a6..28af42e 100644
--- a/Lib/test/test_bz2.py
+++ b/Lib/test/test_bz2.py
@@ -112,22 +112,6 @@ class BZ2FileTest(BaseTest):
self.assertEqual(list(iter(bz2f)), sio.readlines())
bz2f.close()
- def testUniversalNewlinesLF(self):
- # "Test BZ2File.read() with universal newlines (\\n)"
- self.createTempFile()
- bz2f = BZ2File(self.filename, "rU")
- self.assertEqual(bz2f.read(), self.TEXT)
- self.assertEqual(bz2f.newlines, b"\n")
- bz2f.close()
-
- def testUniversalNewlinesCRLF(self):
- # "Test BZ2File.read() with universal newlines (\\r\\n)"
- self.createTempFile(crlf=1)
- bz2f = BZ2File(self.filename, "rU")
- self.assertEqual(bz2f.read(), self.TEXT)
- self.assertEqual(bz2f.newlines, b"\r\n")
- bz2f.close()
-
def testWrite(self):
# "Test BZ2File.write()"
bz2f = BZ2File(self.filename, "w")
@@ -240,16 +224,6 @@ class BZ2FileTest(BaseTest):
# "Test opening a nonexistent file"
self.assertRaises(IOError, BZ2File, "/non/existent")
- def testModeU(self):
- # Bug #1194181: bz2.BZ2File opened for write with mode "U"
- self.createTempFile()
- bz2f = BZ2File(self.filename, "U")
- bz2f.close()
- f = open(self.filename, "rb")
- f.seek(0, 2)
- self.assertEqual(f.tell(), len(self.DATA))
- f.close()
-
def testBug1191043(self):
# readlines() for files containing no newline
data = b'BZh91AY&SY\xd9b\x89]\x00\x00\x00\x03\x80\x04\x00\x02\x00\x0c\x00 \x00!\x9ah3M\x13<]\xc9\x14\xe1BCe\x8a%t'