Commit 9844353f authored by Ximin Luo's avatar Ximin Luo

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.
parent b4c0be0e
......@@ -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
......
Markdown is supported
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