summaryrefslogtreecommitdiff
path: root/tests/test_bio_iobuf.py
diff options
context:
space:
mode:
authorHeikki Toivonen <heikki@heikkitoivonen.net>2006-12-15 00:17:00 +0000
committerHeikki Toivonen <heikki@heikkitoivonen.net>2006-12-15 00:17:00 +0000
commitcc79fc74eb80257d67837c0ea54e60efa32b7eaf (patch)
treec9a06a9a42e2e80144ce1a7e200b7e054773ce0c /tests/test_bio_iobuf.py
parent381167f5d6add76b9461c30d2dabf156e3ff3f04 (diff)
downloadm2crypto-cc79fc74eb80257d67837c0ea54e60efa32b7eaf.tar.gz
Make all test methods start with test_, so that running individual suites works,
for example: python setup.py test --test-suite=tests.test_x509 -q git-svn-id: http://svn.osafoundation.org/m2crypto/trunk@504 2715db39-9adf-0310-9c64-84f055769b4b
Diffstat (limited to 'tests/test_bio_iobuf.py')
-rw-r--r--tests/test_bio_iobuf.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/test_bio_iobuf.py b/tests/test_bio_iobuf.py
index 2fb5a72..358e5df 100644
--- a/tests/test_bio_iobuf.py
+++ b/tests/test_bio_iobuf.py
@@ -19,33 +19,33 @@ class IOBufferTestCase(unittest.TestCase):
def tearDown(self):
pass
- def check_init_empty(self):
+ def test_init_empty(self):
mb = MemoryBuffer()
io = IOBuffer(mb)
out = io.read()
assert out == ''
- def check_init_something(self):
+ def test_init_something(self):
mb = MemoryBuffer(self.data)
io = IOBuffer(mb)
out = io.read(len(self.data))
assert out == self.data
- def check_read_less_than(self):
+ def test_read_less_than(self):
chunk = len(self.data) - 7
mb = MemoryBuffer(self.data)
io = IOBuffer(mb)
out = io.read(chunk)
assert out == self.data[:chunk]
- def check_read_more_than(self):
+ def test_read_more_than(self):
chunk = len(self.data) + 8
mb = MemoryBuffer(self.data)
io = IOBuffer(mb)
out = io.read(chunk)
assert out == self.data
- def check_readline(self):
+ def test_readline(self):
buf = StringIO()
mb = MemoryBuffer(self.data)
io = IOBuffer(mb)
@@ -57,7 +57,7 @@ class IOBufferTestCase(unittest.TestCase):
assert out == self._data
assert buf.getvalue() == self.data
- def check_readlines(self):
+ def test_readlines(self):
buf = StringIO()
mb = MemoryBuffer(self.data)
io = IOBuffer(mb)
@@ -67,14 +67,14 @@ class IOBufferTestCase(unittest.TestCase):
buf.write(line)
assert buf.getvalue() == self.data
- def check_closed(self):
+ def test_closed(self):
mb = MemoryBuffer(self.data)
io = IOBuffer(mb)
io.close()
self.assertRaises(IOError, io.write, self.data)
assert not io.readable() and not io.writeable()
- def check_read_only(self):
+ def test_read_only(self):
mb = MemoryBuffer(self.data)
io = IOBuffer(mb, mode='r')
self.assertRaises(IOError, io.write, self.data)
@@ -82,7 +82,7 @@ class IOBufferTestCase(unittest.TestCase):
def suite():
- return unittest.makeSuite(IOBufferTestCase, 'check_')
+ return unittest.makeSuite(IOBufferTestCase)
if __name__ == '__main__':