Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
diffoscope
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Reproducible Builds
diffoscope
Commits
90952252
Commit
90952252
authored
8 years ago
by
Chris Lamb
Browse files
Options
Downloads
Patches
Plain Diff
tests: Smoke test --progress output.
Signed-off-by:
Chris Lamb
<
lamby@debian.org
>
parent
920d5fba
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_progress.py
+41
-0
41 additions, 0 deletions
tests/test_progress.py
with
41 additions
and
0 deletions
tests/test_progress.py
0 → 100644
+
41
−
0
View file @
90952252
# -*- coding: utf-8 -*-
#
# diffoscope: in-depth comparison of files, archives, and directories
#
# Copyright © 2017 Chris Lamb <lamby@debian.org>
#
# diffoscope is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# diffoscope is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with diffoscope. If not, see <https://www.gnu.org/licenses/>.
import
os
import
pytest
from
diffoscope.main
import
main
TEST_TAR1_PATH
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'
data
'
,
'
test1.tar
'
)
TEST_TAR2_PATH
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'
data
'
,
'
test2.tar
'
)
def
run
(
capsys
,
*
args
):
with
pytest
.
raises
(
SystemExit
)
as
exc
:
main
(
args
)
out
,
err
=
capsys
.
readouterr
()
return
exc
.
value
.
code
,
out
,
err
def
test_progress
(
capsys
):
ret
,
_
,
err
=
run
(
capsys
,
TEST_TAR1_PATH
,
TEST_TAR2_PATH
,
'
--progress
'
)
assert
ret
==
1
assert
"
ETA
"
in
err
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment