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
06d11ddb
Commit
06d11ddb
authored
5 years ago
by
Chris Lamb
Browse files
Options
Downloads
Patches
Plain Diff
Update XML test for Python 3.8+.
parent
4a003697
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/comparators/test_xml.py
+2
-0
2 additions, 0 deletions
tests/comparators/test_xml.py
tests/data/test_xml_expected_diff
+2
-2
2 additions, 2 deletions
tests/data/test_xml_expected_diff
with
4 additions
and
2 deletions
tests/comparators/test_xml.py
+
2
−
0
View file @
06d11ddb
...
...
@@ -17,6 +17,7 @@
# You should have received a copy of the GNU General Public License
# along with diffoscope. If not, see <https://www.gnu.org/licenses/>.
import
sys
import
pytest
from
diffoscope.comparators.xml
import
XMLFile
...
...
@@ -46,6 +47,7 @@ def differences(xml_a, xml_b):
return
xml_a
.
compare
(
xml_b
).
details
@pytest.mark.skipif
(
sys
.
version_info
<
(
3
,
8
),
reason
=
"
requires python3.8 or higher
"
)
def
test_diff
(
differences
):
expected_diff
=
get_data
(
'
test_xml_expected_diff
'
)
assert
differences
[
0
].
unified_diff
==
expected_diff
This diff is collapsed.
Click to expand it.
tests/data/test_xml_expected_diff
+
2
−
2
View file @
06d11ddb
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<note>
<style id="night-mode-pro-style"
type="text/css"
/>
<link
id="night-mode-pro-link" rel="stylesheet" type="text/css
"/>
<style
type="text/css"
id="night-mode-pro-style"/>
<link
type="text/css" rel="stylesheet" id="night-mode-pro-link
"/>
- <to>Tove</to>
- <from>Jani</from>
- <heading>Reminder</heading>
...
...
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