[Git][reproducible-builds/diffoscope][master] Drop two more test fixture fires for the directory tests.
Chris Lamb
gitlab at salsa.debian.org
Sat Nov 23 16:48:55 UTC 2019
Chris Lamb pushed to branch master at Reproducible Builds / diffoscope
Commits:
a0f7a11b by Chris Lamb at 2019-11-23T16:47:09Z
Drop two more test fixture fires for the directory tests.
- - - - -
4 changed files:
- tests/comparators/test_directory.py
- − tests/data/text_ascii1
- − tests/data/text_ascii2
- tests/test_source.py
Changes:
=====================================
tests/comparators/test_directory.py
=====================================
@@ -26,11 +26,28 @@ from diffoscope.comparators.binary import FilesystemFile
from diffoscope.comparators.directory import compare_directories
from diffoscope.comparators.utils.specialize import specialize
-from ..utils.data import data, get_data
+from ..utils.data import get_data
+ASCII1 = """Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
+incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
+nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
+Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
+fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
+culpa qui officia deserunt mollit anim id est laborum.
+"""
-TEST_FILE1_PATH = data('text_ascii1')
-TEST_FILE2_PATH = data('text_ascii2')
+ASCII2 = """A common form of lorem ipsum reads:
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
+incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
+nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
+Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
+fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
+culpa qui officia deserunt mollit anim id est laborum.
+
+"Lorem ipsum" text is derived from sections 1.10.32--3 of Cicero's De finibus
+bonorum et malorum (On the Ends of Goods and Evils, or alternatively [About]
+The Purposes of Good and Evil)."""
def test_no_differences():
@@ -53,8 +70,10 @@ def differences(tmpdir):
tmpdir.mkdir('a/dir')
tmpdir.mkdir('b')
tmpdir.mkdir('b/dir')
- shutil.copy(TEST_FILE1_PATH, str(tmpdir.join('a/dir/text')))
- shutil.copy(TEST_FILE2_PATH, str(tmpdir.join('b/dir/text')))
+ with open(str(tmpdir.join('a/dir/text')), 'w') as f:
+ f.write(ASCII1)
+ with open(str(tmpdir.join('b/dir/text')), 'w') as f:
+ f.write(ASCII2)
os.utime(str(tmpdir.join('a/dir/text')), (0, 0))
os.utime(str(tmpdir.join('b/dir/text')), (0, 0))
os.utime(str(tmpdir.join('a/dir')), (0, 0))
=====================================
tests/data/text_ascii1 deleted
=====================================
@@ -1,6 +0,0 @@
-Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
-incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
-nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
-Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
-fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
-culpa qui officia deserunt mollit anim id est laborum.
=====================================
tests/data/text_ascii2 deleted
=====================================
@@ -1,12 +0,0 @@
-A common form of lorem ipsum reads:
-
-Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
-incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
-nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
-Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
-fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
-culpa qui officia deserunt mollit anim id est laborum.
-
-"Lorem ipsum" text is derived from sections 1.10.32--3 of Cicero's De finibus
-bonorum et malorum (On the Ends of Goods and Evils, or alternatively [About]
-The Purposes of Good and Evil).
=====================================
tests/test_source.py
=====================================
@@ -218,8 +218,6 @@ ALLOWED_TEST_FILES = {
'test_openssh_pub_key2.pub',
'test_weird_non_unicode_chars1.pdf',
'test_weird_non_unicode_chars2.pdf',
- 'text_ascii1',
- 'text_ascii2',
'text_iso8859',
'text_order1',
'text_order2',
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/commit/a0f7a11b6e5adbe8e5e0a99cee3e7accb7a1afbf
--
View it on GitLab: https://salsa.debian.org/reproducible-builds/diffoscope/commit/a0f7a11b6e5adbe8e5e0a99cee3e7accb7a1afbf
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20191123/1b5a9609/attachment.htm>
More information about the rb-commits
mailing list