consistent naming
This commit is contained in:
@@ -23,7 +23,7 @@ class TestRecfile(unittest.TestCase):
|
|||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
shutil.rmtree('tests')
|
shutil.rmtree('tests')
|
||||||
|
|
||||||
def testgeneration(self):
|
def test_generation(self):
|
||||||
for k in range(10):
|
for k in range(10):
|
||||||
teststring = 'test%s' % k
|
teststring = 'test%s' % k
|
||||||
filename = os.path.join('tests', str(uuid.uuid4()) + '.test')
|
filename = os.path.join('tests', str(uuid.uuid4()) + '.test')
|
||||||
@@ -48,7 +48,7 @@ class TestRecfile(unittest.TestCase):
|
|||||||
self.assertFalse(is_there)
|
self.assertFalse(is_there)
|
||||||
for k in range(10):
|
for k in range(10):
|
||||||
teststring = 'test%s' % k
|
teststring = 'test%s' % k
|
||||||
filename = os.path.join('tests', str(uuid.uuid4()) , str(uuid.uuid4()) + '.test')
|
filename = os.path.join('tests', str(uuid.uuid4()), str(uuid.uuid4()) + '.test')
|
||||||
with recfile.open(filename, "w") as g:
|
with recfile.open(filename, "w") as g:
|
||||||
g.write(teststring)
|
g.write(teststring)
|
||||||
self.assertEqual(recfile.open(filename, "r").read(), teststring)
|
self.assertEqual(recfile.open(filename, "r").read(), teststring)
|
||||||
@@ -70,6 +70,5 @@ class TestRecfile(unittest.TestCase):
|
|||||||
self.assertRaises(IOError, recfile.open, filename, "r")
|
self.assertRaises(IOError, recfile.open, filename, "r")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
|||||||
Reference in New Issue
Block a user