1
0
mirror of synced 2024-11-22 01:04:23 +01:00

Improve a bit the robustness of the testsuite

This commit is contained in:
jvoisin 2020-02-05 21:53:57 +01:00
parent e0f4f0e302
commit 6dd48de4ef

View File

@ -484,13 +484,15 @@ class TestCleaning(unittest.TestCase):
shutil.copy('./tests/data/dirty.' + case['name'], target)
p1 = case['parser'](target)
meta = p1.get_meta()
for k, v in case['meta'].items():
for k, v in p1.get_meta().items():
if k not in case['meta']:
continue
if isinstance(v, dict):
for _k, _v in v.items():
self.assertEqual(meta[k][_k], _v)
if _k in case['meta'][k]:
self.assertEqual(_v, case['meta'][k][_k])
else:
self.assertEqual(meta[k], v)
self.assertEqual(v, case['meta'][k])
p1.lightweight_cleaning = True
self.assertTrue(p1.remove_all())