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
e20a5055
Commit
e20a5055
authored
5 months ago
by
Chris Lamb
Browse files
Options
Downloads
Patches
Plain Diff
Move to assert_diff in test_text.py
parent
2dd46bb7
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/comparators/test_text.py
+3
-4
3 additions, 4 deletions
tests/comparators/test_text.py
with
3 additions
and
4 deletions
tests/comparators/test_text.py
+
3
−
4
View file @
e20a5055
...
...
@@ -23,7 +23,7 @@ from diffoscope.comparators.binary import FilesystemFile
from
diffoscope.comparators.text
import
TextFile
from
diffoscope.comparators.utils.specialize
import
specialize
from
..utils.data
import
data
,
load_fixture
,
get_data
from
..utils.data
import
data
,
load_fixture
,
assert_diff
from
..utils.nonexisting
import
assert_non_existing
...
...
@@ -39,8 +39,7 @@ def test_no_differences(ascii1):
def
test_difference_in_ascii
(
ascii1
,
ascii2
):
difference
=
ascii1
.
compare
(
ascii2
)
assert
difference
is
not
None
expected_diff
=
get_data
(
"
text_ascii_expected_diff
"
)
assert
difference
.
unified_diff
==
expected_diff
assert_diff
(
difference
,
"
text_ascii_expected_diff
"
)
assert
not
difference
.
comments
assert
len
(
difference
.
details
)
==
0
...
...
@@ -95,7 +94,7 @@ text_order2 = load_fixture("text_order2")
def
test_ordering_differences
(
text_order1
,
text_order2
):
difference
=
text_order1
.
compare
(
text_order2
)
assert
difference
.
comments
==
[
"
Ordering differences only
"
]
assert
difference
.
unified_diff
==
get_data
(
"
text_order_expected_diff
"
)
assert
_diff
(
difference
,
"
text_order_expected_diff
"
)
def
test_text_fallback
(
tmp_path
):
...
...
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