From 1bdcc9f44efb87c1ad797e58f71b8b0055a7864a Mon Sep 17 00:00:00 2001 From: Augusto Gunsch Date: Mon, 15 Nov 2021 18:24:50 -0300 Subject: [PATCH] Fix tests cleanup --- tests/integration.py | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/tests/integration.py b/tests/integration.py index 40a16bb..0e0a193 100644 --- a/tests/integration.py +++ b/tests/integration.py @@ -26,18 +26,17 @@ class TestFsub(unittest.TestCase): limit = len(ofiles) for i, ifile in enumerate(ifiles): - if i == limit: - break - out = open(ifile) - result = out.read() - out.close() + if i < limit: + out = open(ifile) + result = out.read() + out.close() - ofile = str(self.samples / ofiles[i]) + '.srt' - cmp_file = open(ofile) - cmp = cmp_file.read() - cmp_file.close() + ofile = str(self.samples / ofiles[i]) + '.srt' + cmp_file = open(ofile) + cmp = cmp_file.read() + cmp_file.close() - self.assertEqual(result, cmp) + self.assertEqual(result, cmp) os.remove(ifile) def test_cleaned(self):