summaryrefslogtreecommitdiffhomepage
path: root/tests/test_file.py
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2019-06-08 10:53:08 -0400
committerJeff Forcier <jeff@bitprophet.org>2019-06-08 10:53:08 -0400
commit8cf1aed7de71409c8fe5d04b211fea5998b3e29a (patch)
tree399a738d4d4ec8b99e03d627079cbe4ab35c795d /tests/test_file.py
parentcbcb0b8868297e90e7979dc512f6a9ee98f527f4 (diff)
Clean up shitty old test names of form test_[9-0A-Z]+_.*
Diffstat (limited to 'tests/test_file.py')
-rw-r--r--tests/test_file.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/test_file.py b/tests/test_file.py
index fba14b1b..32b77762 100644
--- a/tests/test_file.py
+++ b/tests/test_file.py
@@ -52,7 +52,7 @@ class LoopbackFile(BufferedFile):
class BufferedFileTest(unittest.TestCase):
- def test_1_simple(self):
+ def test_simple(self):
f = LoopbackFile("r")
try:
f.write(b"hi")
@@ -69,7 +69,7 @@ class BufferedFileTest(unittest.TestCase):
pass
f.close()
- def test_2_readline(self):
+ def test_readline(self):
f = LoopbackFile("r+U")
f.write(
b"First line.\nSecond line.\r\nThird line.\n"
@@ -96,7 +96,7 @@ class BufferedFileTest(unittest.TestCase):
self.assertTrue(crlf in f.newlines)
self.assertTrue(cr_byte not in f.newlines)
- def test_3_lf(self):
+ def test_lf(self):
"""
try to trick the linefeed detector.
"""
@@ -108,7 +108,7 @@ class BufferedFileTest(unittest.TestCase):
f.close()
self.assertEqual(f.newlines, crlf)
- def test_4_write(self):
+ def test_write(self):
"""
verify that write buffering is on.
"""
@@ -120,7 +120,7 @@ class BufferedFileTest(unittest.TestCase):
self.assertEqual(f.readline(), "Incomplete line...\n")
f.close()
- def test_5_flush(self):
+ def test_flush(self):
"""
verify that flush will force a write.
"""
@@ -134,7 +134,7 @@ class BufferedFileTest(unittest.TestCase):
self.assertEqual(f.read(3), b"")
f.close()
- def test_6_buffering(self):
+ def test_buffering_flushes(self):
"""
verify that flushing happens automatically on buffer crossing.
"""
@@ -147,7 +147,7 @@ class BufferedFileTest(unittest.TestCase):
self.assertEqual(f.read(20), b"Too small. Enough.")
f.close()
- def test_7_read_all(self):
+ def test_read_all(self):
"""
verify that read(-1) returns everything left in the file.
"""
@@ -162,7 +162,7 @@ class BufferedFileTest(unittest.TestCase):
)
f.close()
- def test_8_buffering(self):
+ def test_buffering_writes(self):
"""
verify that buffered objects can be written
"""
@@ -171,21 +171,21 @@ class BufferedFileTest(unittest.TestCase):
f.write(buffer(b"Too small."))
f.close()
- def test_9_readable(self):
+ def test_readable(self):
f = LoopbackFile("r")
self.assertTrue(f.readable())
self.assertFalse(f.writable())
self.assertFalse(f.seekable())
f.close()
- def test_A_writable(self):
+ def test_writable(self):
f = LoopbackFile("w")
self.assertTrue(f.writable())
self.assertFalse(f.readable())
self.assertFalse(f.seekable())
f.close()
- def test_B_readinto(self):
+ def test_readinto(self):
data = bytearray(5)
f = LoopbackFile("r+")
f._write(b"hello")