Skip to content
Commits on Source (2)
......@@ -175,9 +175,7 @@ def run_diff(fifo1, fifo2, end_nl_q1, end_nl_q2):
logger.debug("Running %s", ' '.join(cmd))
p = subprocess.run(
cmd, bufsize=1, stdout=subprocess.PIPE, stderr=subprocess.STDOUT
)
p = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
parser = DiffParser(p.stdout, end_nl_q1, end_nl_q2)
parser.parse()
......
......@@ -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>
......