Commit 6dd48de4 authored by jvoisin's avatar jvoisin
Browse files

Improve a bit the robustness of the testsuite

parent e0f4f0e3
......@@ -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']:
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])
self.assertEqual(meta[k], v)
self.assertEqual(v, case['meta'][k])
p1.lightweight_cleaning = True
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment