Commit 06d11ddb authored by Chris Lamb's avatar Chris Lamb 💬

Update XML test for Python 3.8+.

parent 4a003697
......@@ -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
@@ -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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment