[diffoscope] 01/01: Don't require that presenter tests are run at a specific time and by, well, me.
Chris Lamb
chris at chris-lamb.co.uk
Fri Jan 26 00:01:18 CET 2018
This is an automated email from the git hooks/post-receive script.
lamby pushed a commit to branch master
in repository diffoscope.
commit cea21242d88f9130962b89fd052470cfc068a959
Author: Chris Lamb <lamby at debian.org>
Date: Fri Jan 26 09:49:54 2018 +1100
Don't require that presenter tests are run at a specific time and by, well, me.
---
tests/data/archive12.diff.txt | 11 -----------
tests/data/output.colored.txt | 11 -----------
tests/data/output.json | 5 -----
tests/data/output.md | 13 -------------
tests/data/output.rst | 17 -----------------
tests/data/output.txt | 11 -----------
tests/test_presenters.py | 14 +++++++++-----
7 files changed, 9 insertions(+), 73 deletions(-)
diff --git a/tests/data/archive12.diff.txt b/tests/data/archive12.diff.txt
index 50a1ebe..3b861ab 100644
--- a/tests/data/archive12.diff.txt
+++ b/tests/data/archive12.diff.txt
@@ -13,14 +13,3 @@
│ │ @@ -1 +1 @@
│ │ -a
│ │ +b
-├── stat {}
-│ @@ -1,8 +1,8 @@
-│
-│ Size: 10240 Blocks: 24 IO Block: 4096 regular file
-│ Links: 1
-│ Access: (0644/-rw-r--r--) Uid: ( 1000/ lamby) Gid: ( 1000/ lamby)
-│
-│ -Modify: 2017-06-18 07:22:17.232540259 +0000
-│ +Modify: 2017-06-18 07:22:17.196540208 +0000
-│
-│ Birth: -
diff --git a/tests/data/output.colored.txt b/tests/data/output.colored.txt
index 3205fc2..62102c0 100644
--- a/tests/data/output.colored.txt
+++ b/tests/data/output.colored.txt
@@ -29,14 +29,3 @@
│ [0;36m@@ -1 +1 @@[0m
│ [31m-destination: broken[0m
│ [32m+destination: really-broken[0m
-├── stat {}
-│ [0;36m@@ -1,8 +1,8 @@[0m
-│
-│ Size: 10240 Blocks: 24 IO Block: 4096 regular file
-│ Links: 1
-│ Access: (0644/-rw-r--r--) Uid: ( 1000/ lamby) Gid: ( 1000/ lamby)
-│
-│ [31m-Modify: 2017-06-18 07:22:17.216540236 +0000[0m
-│ [32m+Modify: 2017-06-18 07:22:17.196540208 +0000[0m
-│
-│ Birth: -
diff --git a/tests/data/output.json b/tests/data/output.json
index 8a7caad..d8b5eba 100644
--- a/tests/data/output.json
+++ b/tests/data/output.json
@@ -21,11 +21,6 @@
"symlink"
],
"unified_diff": "@@ -1 +1 @@\n-destination: broken\n+destination: really-broken\n"
- },
- {
- "source1": "stat {}",
- "source2": "stat {}",
- "unified_diff": "@@ -1,8 +1,8 @@\n \n Size: 10240 \tBlocks: 24 IO Block: 4096 regular file\n Links: 1\n Access: (0644/-rw-r--r--) Uid: ( 1000/ lamby) Gid: ( 1000/ lamby)\n \n-Modify: 2017-06-18 07:22:17.216540236 +0000\n+Modify: 2017-06-18 07:22:17.196540208 +0000\n \n Birth: -\n"
}
]
}
diff --git a/tests/data/output.md b/tests/data/output.md
index 31abb52..a147d58 100644
--- a/tests/data/output.md
+++ b/tests/data/output.md
@@ -36,16 +36,3 @@ symlink
-destination: broken
+destination: really-broken
-## stat {}
-
- @@ -1,8 +1,8 @@
-
- Size: 10240 Blocks: 24 IO Block: 4096 regular file
- Links: 1
- Access: (0644/-rw-r--r--) Uid: ( 1000/ lamby) Gid: ( 1000/ lamby)
-
- -Modify: 2017-06-18 07:22:17.216540236 +0000
- +Modify: 2017-06-18 07:22:17.196540208 +0000
-
- Birth: -
-
diff --git a/tests/data/output.rst b/tests/data/output.rst
index a08aa92..08e60e3 100644
--- a/tests/data/output.rst
+++ b/tests/data/output.rst
@@ -50,20 +50,3 @@ symlink
-destination: broken
+destination: really-broken
--------
-stat {}
--------
-
-::
-
- @@ -1,8 +1,8 @@
-
- Size: 10240 Blocks: 24 IO Block: 4096 regular file
- Links: 1
- Access: (0644/-rw-r--r--) Uid: ( 1000/ lamby) Gid: ( 1000/ lamby)
-
- -Modify: 2017-06-18 07:22:17.216540236 +0000
- +Modify: 2017-06-18 07:22:17.196540208 +0000
-
- Birth: -
-
diff --git a/tests/data/output.txt b/tests/data/output.txt
index 7bfb953..681ece0 100644
--- a/tests/data/output.txt
+++ b/tests/data/output.txt
@@ -29,14 +29,3 @@
│ @@ -1 +1 @@
│ -destination: broken
│ +destination: really-broken
-├── stat {}
-│ @@ -1,8 +1,8 @@
-│
-│ Size: 10240 Blocks: 24 IO Block: 4096 regular file
-│ Links: 1
-│ Access: (0644/-rw-r--r--) Uid: ( 1000/ lamby) Gid: ( 1000/ lamby)
-│
-│ -Modify: 2017-06-18 07:22:17.216540236 +0000
-│ +Modify: 2017-06-18 07:22:17.196540208 +0000
-│
-│ Birth: -
diff --git a/tests/test_presenters.py b/tests/test_presenters.py
index f5bd409..b365fae 100644
--- a/tests/test_presenters.py
+++ b/tests/test_presenters.py
@@ -36,7 +36,7 @@ re_html = re.compile(r'.*<body(?P<body>.*)<div class="footer">', re.MULTILINE |
def run(capsys, *args, pair=('test1.tar', 'test2.tar')):
with pytest.raises(SystemExit) as exc, cwd_data():
- main(args + pair)
+ main(('--exclude-directory-metadata',) + args + pair)
out, err = capsys.readouterr()
assert err == ''
@@ -137,7 +137,7 @@ def test_html_option_with_file(tmpdir, capsys):
assert out == ''
with open(report_path, 'r', encoding='utf-8') as f:
body = extract_body(f.read())
- assert body.count('div class="difference"') == 5
+ assert body.count('div class="difference"') == 4
@skip_unless_tools_exist('compare', 'convert', 'sng')
@@ -161,21 +161,25 @@ def test_htmldir_option(tmpdir, capsys):
assert os.path.isdir(html_dir)
with open(os.path.join(html_dir, 'index.html'), 'r', encoding='utf-8') as f:
body = extract_body(f.read())
- assert body.count('div class="difference"') == 5
+ assert body.count('div class="difference"') == 4
def test_html_option_with_stdout(capsys):
body = extract_body(run(capsys, '--html', '-'))
- assert body.count('div class="difference"') == 5
+ assert body.count('div class="difference"') == 4
def test_html_regression_875281(tmpdir, capsys):
# this test fails when you `git revert -Xtheirs ccd926f`
diff_path = expand_collapsed_json(tmpdir, 'debian-bug-875281')
report_path = str(tmpdir.join('report.html'))
- out = run(capsys, '--html', report_path, pair=(diff_path,))
+ with pytest.raises(SystemExit) as exc, cwd_data():
+ main(('--html', report_path, diff_path,))
+ out, err = capsys.readouterr()
+ assert exc.value.code == 1
assert out == ''
+ assert err == ''
def test_limited_print():
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git
More information about the diffoscope
mailing list