Fix tests cleanup
This commit is contained in:
parent
45acfa2b1c
commit
1bdcc9f44e
|
@ -26,18 +26,17 @@ class TestFsub(unittest.TestCase):
|
||||||
|
|
||||||
limit = len(ofiles)
|
limit = len(ofiles)
|
||||||
for i, ifile in enumerate(ifiles):
|
for i, ifile in enumerate(ifiles):
|
||||||
if i == limit:
|
if i < limit:
|
||||||
break
|
out = open(ifile)
|
||||||
out = open(ifile)
|
result = out.read()
|
||||||
result = out.read()
|
out.close()
|
||||||
out.close()
|
|
||||||
|
|
||||||
ofile = str(self.samples / ofiles[i]) + '.srt'
|
ofile = str(self.samples / ofiles[i]) + '.srt'
|
||||||
cmp_file = open(ofile)
|
cmp_file = open(ofile)
|
||||||
cmp = cmp_file.read()
|
cmp = cmp_file.read()
|
||||||
cmp_file.close()
|
cmp_file.close()
|
||||||
|
|
||||||
self.assertEqual(result, cmp)
|
self.assertEqual(result, cmp)
|
||||||
os.remove(ifile)
|
os.remove(ifile)
|
||||||
|
|
||||||
def test_cleaned(self):
|
def test_cleaned(self):
|
||||||
|
|
Loading…
Reference in New Issue