[diffoscope] 02/05: tests: Reload Comparators after every test so we are always in a consistent state.

Chris Lamb chris at chris-lamb.co.uk
Sat Feb 4 03:45:27 CET 2017


This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch master
in repository diffoscope.

commit 5362315ec73eb5f6183bad20afe50f698cfa91f4
Author: Chris Lamb <lamby at debian.org>
Date:   Sat Feb 4 14:47:43 2017 +1300

    tests: Reload Comparators after every test so we are always in a consistent state.
    
    Signed-off-by: Chris Lamb <lamby at debian.org>
---
 tests/conftest.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/tests/conftest.py b/tests/conftest.py
index 36a2f52..f50ee5b 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -20,7 +20,14 @@
 import pytest
 
 from diffoscope.locale import set_locale
+from diffoscope.comparators import ComparatorManager
 
 
 # Ensure set_locale fixture runs before all tests.
 set_locale = pytest.fixture(autouse=True, scope='session')(set_locale)
+
+ at pytest.fixture(autouse=True)
+def reload_comparators():
+    # Reload Comparators after every test so we are always in a consistent
+    # state
+    ComparatorManager().reload()

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git


More information about the diffoscope mailing list