[diffoscope] 01/01: Fix test by running compare_root_paths to set global defaults

Ximin Luo infinity0 at debian.org
Fri Jan 26 01:58:27 CET 2018


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

infinity0 pushed a commit to branch master
in repository diffoscope.

commit 9844353f03aa8cbb54dff22433815ccb01bc40a8
Author: Ximin Luo <infinity0 at debian.org>
Date:   Fri Jan 26 01:57:55 2018 +0100

    Fix test by running compare_root_paths to set global defaults
    
    Actually this reveals that the Config() singleton pattern does not play nicely
    with our tests, eventually this should be cleaned up.
---
 tests/comparators/test_directory.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/comparators/test_directory.py b/tests/comparators/test_directory.py
index cc184e3..880f2e3 100644
--- a/tests/comparators/test_directory.py
+++ b/tests/comparators/test_directory.py
@@ -22,6 +22,7 @@ import os
 import shutil
 import pytest
 
+from diffoscope.config import Config
 from diffoscope.comparators.binary import FilesystemFile
 from diffoscope.comparators.directory import compare_directories
 from diffoscope.comparators.utils.specialize import specialize
@@ -57,6 +58,10 @@ def differences(tmpdir):
     os.utime(str(tmpdir.join('b/dir')), (0, 0))
     os.utime(str(tmpdir.join('a')), (0, 0))
     os.utime(str(tmpdir.join('b')), (0, 0))
+    # Earlier tests set this to True, unfortunately.
+    # i.e. the Config() singleton pattern does not play nicely
+    # with our tests, eventually that should be cleaned up.
+    Config().exclude_directory_metadata = False
     return compare_directories(str(tmpdir.join('a')), str(tmpdir.join('b'))).details
 
 

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


More information about the diffoscope mailing list