[diffoscope] 05/09: Add forgotten requirements for tests with non-existing files
Jérémy Bobbio
lunar at moszumanska.debian.org
Tue Jan 19 18:22:30 CET 2016
This is an automated email from the git hooks/post-receive script.
lunar pushed a commit to branch master
in repository diffoscope.
commit 141f1868017564cf21efd5851cbd55d11f013063
Author: Jérémy Bobbio <lunar at debian.org>
Date: Tue Jan 19 14:51:25 2016 +0000
Add forgotten requirements for tests with non-existing files
---
tests/comparators/test_fonts.py | 1 +
tests/comparators/test_image.py | 1 +
tests/comparators/test_mono.py | 1 +
tests/comparators/test_pdf.py | 2 ++
tests/comparators/test_png.py | 1 +
tests/comparators/test_ppu.py | 1 +
tests/comparators/test_sqlite.py | 1 +
7 files changed, 8 insertions(+)
diff --git a/tests/comparators/test_fonts.py b/tests/comparators/test_fonts.py
index 317eb82..cd1a536 100644
--- a/tests/comparators/test_fonts.py
+++ b/tests/comparators/test_fonts.py
@@ -52,6 +52,7 @@ def test_diff(differences):
expected_diff = open(os.path.join(os.path.dirname(__file__), '../data/ttf_expected_diff')).read()
assert differences[0].unified_diff == expected_diff
+ at pytest.mark.skipif(tool_missing('showttf'), reason='missing showttf')
def test_compare_non_existing(monkeypatch, ttf1):
monkeypatch.setattr(Config, 'new_file', True)
difference = ttf1.compare(NonExistingFile('/nonexisting', ttf1))
diff --git a/tests/comparators/test_image.py b/tests/comparators/test_image.py
index abab26e..4ce1a4a 100644
--- a/tests/comparators/test_image.py
+++ b/tests/comparators/test_image.py
@@ -53,6 +53,7 @@ def test_diff(differences):
expected_diff = open(os.path.join(os.path.dirname(__file__), '../data/image_expected_diff')).read()
assert differences[0].unified_diff == expected_diff
+ at pytest.mark.skipif(tool_missing('img2txt'), reason='img2txt')
def test_compare_non_existing(monkeypatch, image1):
monkeypatch.setattr(Config, 'new_file', True)
difference = image1.compare(NonExistingFile('/nonexisting', image1))
diff --git a/tests/comparators/test_mono.py b/tests/comparators/test_mono.py
index d7933c9..08dbe2e 100644
--- a/tests/comparators/test_mono.py
+++ b/tests/comparators/test_mono.py
@@ -57,6 +57,7 @@ def test_diff(differences):
expected_diff = open(os.path.join(os.path.dirname(__file__), '../data/pe_expected_diff')).read()
assert differences[0].unified_diff == expected_diff
+ at pytest.mark.skipif(tool_missing('pedump'), reason='missing pedump')
def test_compare_non_existing(monkeypatch, exe1):
monkeypatch.setattr(Config, 'new_file', True)
difference = exe1.compare(NonExistingFile('/nonexisting', exe1))
diff --git a/tests/comparators/test_pdf.py b/tests/comparators/test_pdf.py
index 1dc3972..7b4cb21 100644
--- a/tests/comparators/test_pdf.py
+++ b/tests/comparators/test_pdf.py
@@ -59,6 +59,8 @@ def test_internal_diff(differences):
expected_diff = open(os.path.join(os.path.dirname(__file__), '../data/pdf_internal_expected_diff')).read()
assert differences[1].unified_diff == expected_diff
+ at pytest.mark.skipif(tool_missing('pdftk') or tool_missing('pdftotext'),
+ reason='missing pdftk or pdftotext')
def test_compare_non_existing(monkeypatch, pdf1):
monkeypatch.setattr(Config, 'new_file', True)
difference = pdf1.compare(NonExistingFile('/nonexisting', pdf1))
diff --git a/tests/comparators/test_png.py b/tests/comparators/test_png.py
index 6cf4089..976824e 100644
--- a/tests/comparators/test_png.py
+++ b/tests/comparators/test_png.py
@@ -52,6 +52,7 @@ def test_diff(differences):
expected_diff = open(os.path.join(os.path.dirname(__file__), '../data/png_expected_diff')).read()
assert differences[0].unified_diff == expected_diff
+ at pytest.mark.skipif(tool_missing('sng'), reason='missing sng')
def test_compare_non_existing(monkeypatch, png1):
monkeypatch.setattr(Config, 'new_file', True)
difference = png1.compare(NonExistingFile('/nonexisting', png1))
diff --git a/tests/comparators/test_ppu.py b/tests/comparators/test_ppu.py
index 6326946..fe1128c 100644
--- a/tests/comparators/test_ppu.py
+++ b/tests/comparators/test_ppu.py
@@ -61,6 +61,7 @@ def test_diff(differences):
expected_diff = open(os.path.join(os.path.dirname(__file__), '../data/ppu_expected_diff')).read()
assert differences[0].unified_diff == expected_diff
+ at pytest.mark.skipif(tool_missing('ppudump'), reason='missing ppudump')
def test_compare_non_existing(monkeypatch, file1):
monkeypatch.setattr(Config, 'new_file', True)
difference = file1.compare(NonExistingFile('/nonexisting', file1))
diff --git a/tests/comparators/test_sqlite.py b/tests/comparators/test_sqlite.py
index 4ff3a63..5ac1c38 100644
--- a/tests/comparators/test_sqlite.py
+++ b/tests/comparators/test_sqlite.py
@@ -52,6 +52,7 @@ def test_diff(differences):
expected_diff = open(os.path.join(os.path.dirname(__file__), '../data/sqlite3_expected_diff')).read()
assert differences[0].unified_diff == expected_diff
+ at pytest.mark.skipif(tool_missing('sqlite3'), reason='missing sqlite3')
def test_compare_non_existing(monkeypatch, sqlite3db1):
monkeypatch.setattr(Config.general, 'new_file', True)
difference = sqlite3db1.compare(NonExistingFile('/nonexisting', sqlite3db1))
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git
More information about the diffoscope
mailing list