When adding automated results with a JUnit XML file generated by Pytest, it appears that Testiny fails to parse the message property of the failure element. The Line Feed characters ( ) aren’t parsed, and are instead shown literally. An example is the following:
<failure message="assert -1 < -1 Failing test case: test_two_negative_numbers( first_number=0, second_number=-1, # or any other generated value )">
It would be expected that this would be interpreted and rendered with a line break, or alternatively removed entirely.
3 - Steps to reproduce
Import the following example JUnit XML file:
junit.xml
<?xml version="1.0" encoding="utf-8"?>
<testsuites name="pytest tests">
<testsuite name="pytest" errors="0" failures="1" skipped="0" tests="12" time="0.323"
timestamp="2026-09-07T10:33:55.668367+00:00" hostname="KOP-L100007">
<testcase classname="tests.test_math" name="test_sum_of_digits" time="0.020" />
<testcase classname="tests.test_math" name="test_add_zero" time="0.019" />
<testcase classname="tests.test_math" name="test_double_number" time="0.025" />
<testcase classname="tests.test_math" name="test_double_zero" time="0.000" />
<testcase classname="tests.test_math" name="test_add_single_number" time="0.018" />
<testcase classname="tests.test_math" name="test_add_two_positive_numbers" time="0.025" />
<testcase classname="tests.test_math" name="test_add_multiple_zeros" time="0.044" />
<testcase classname="tests.test_math" name="test_reverse_first_last_swapped" time="0.019" />
<testcase classname="tests.test_math" name="test_two_negative_numbers" time="0.024" />
<testcase classname="tests.test_math" name="test_add_positive_and_negative_numbers"
time="0.033" />
<testcase classname="tests.test_math" name="test_add_self" time="0.010">
<failure
message="assert 2 == (1 * 3) Failing test case: test_add_self( number=1, )">@given(strategies.integers())
> def test_add_self(number):
^^^
f = <function given.<locals>.run_test_as_given.<locals>.wrapped_test
at 0x7de07ad9cea0>
tests/test_math.py:64:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
number = 1
@given(strategies.integers())
def test_add_self(number):
"""
Adding a number to itself should double it
"""
result = add(number, number)
> assert result == number * 3
E assert 2 == (1 * 3)
E Failing test case: test_add_self(
E number=1,
E )
number = 1
result = 2
tests/test_math.py:69: AssertionError</failure>
</testcase>
<testcase classname="tests.test_math" name="test_reverse_single_digit" time="0.003" />
</testsuite>
</testsuites>
This results in the following being shown:
Note that the Line Feed characters ( ) have not been parsed, and instead are shown literally.
