[diffoscope] 05/05: comparators/utils: Move compare to under new package.
Chris Lamb
chris at chris-lamb.co.uk
Tue Dec 27 18:16:16 CET 2016
This is an automated email from the git hooks/post-receive script.
lamby pushed a commit to branch master
in repository diffoscope.
commit 75256e6bb85079ebb58a457010d75ad8fb9a6501
Author: Chris Lamb <lamby at debian.org>
Date: Tue Dec 27 14:34:10 2016 +0000
comparators/utils: Move compare to under new package.
Signed-off-by: Chris Lamb <lamby at debian.org>
---
diffoscope/comparators/directory.py | 2 +-
diffoscope/comparators/{ => utils}/compare.py | 6 +++---
diffoscope/main.py | 2 +-
tests/comparators/test_deb.py | 4 ++--
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/diffoscope/comparators/directory.py b/diffoscope/comparators/directory.py
index 102bc94..4edbadd 100644
--- a/diffoscope/comparators/directory.py
+++ b/diffoscope/comparators/directory.py
@@ -28,7 +28,7 @@ from diffoscope.difference import Difference
from .utils import Container, Command
from .binary import FilesystemFile
-from .compare import compare_files
+from .utils.compare import compare_files
def list_files(path):
diff --git a/diffoscope/comparators/compare.py b/diffoscope/comparators/utils/compare.py
similarity index 93%
rename from diffoscope/comparators/compare.py
rename to diffoscope/comparators/utils/compare.py
index 3d36d00..e5e3e1d 100644
--- a/diffoscope/comparators/compare.py
+++ b/diffoscope/comparators/utils/compare.py
@@ -6,12 +6,12 @@ from diffoscope.config import Config
from diffoscope.profiling import profile
from diffoscope.difference import Difference
-from . import specialize
-from .binary import NonExistingFile
+from .. import specialize
+from ..binary import NonExistingFile
def compare_root_paths(path1, path2):
- from .directory import FilesystemDirectory, FilesystemFile, compare_directories
+ from ..directory import FilesystemDirectory, FilesystemFile, compare_directories
if not Config().new_file:
bail_if_non_existing(path1, path2)
diff --git a/diffoscope/main.py b/diffoscope/main.py
index 0b1fd7c..50ff83a 100644
--- a/diffoscope/main.py
+++ b/diffoscope/main.py
@@ -34,10 +34,10 @@ from diffoscope.config import Config
from diffoscope.progress import ProgressManager, Progress
from diffoscope.profiling import ProfileManager, profile
from diffoscope.difference import Difference
-from diffoscope.comparators.compare import compare_root_paths
from diffoscope.presenters.html import output_html, output_html_directory, \
JQUERY_SYSTEM_LOCATIONS
from diffoscope.presenters.text import output_text
+from diffoscope.comparators.utils.compare import compare_root_paths
try:
import tlsh
diff --git a/tests/comparators/test_deb.py b/tests/comparators/test_deb.py
index 8345cba..0fa5c31 100644
--- a/tests/comparators/test_deb.py
+++ b/tests/comparators/test_deb.py
@@ -92,11 +92,11 @@ def test_identification_of_data_tar(deb1, deb2, monkeypatch):
def test_skip_comparison_of_known_identical_files(deb1, deb2, monkeypatch):
compared = set()
- orig_func = diffoscope.comparators.compare.compare_files
+ orig_func = diffoscope.comparators.utils.compare.compare_files
def probe(file1, file2, source=None):
compared.add(file1.name)
return orig_func(file1, file2, source=None)
- monkeypatch.setattr(diffoscope.comparators.compare, 'compare_files', probe)
+ monkeypatch.setattr(diffoscope.comparators.utils.compare, 'compare_files', probe)
deb1.compare(deb2)
assert './usr/share/doc/test/README.Debian' not in compared
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git
More information about the diffoscope
mailing list