Files
slic/ci-reports/xml/pytest-report.xml
T

397 lines
25 KiB
XML

<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite name="pytest" errors="2" failures="32" skipped="2" tests="51" time="0.552" timestamp="2025-07-15T12:27:14.825282+00:00" hostname="8fa5463b6fc5"><testcase classname="" name="tests.test_broken_fct" time="0.000"><error message="collection failure">.pixi/envs/default/lib/python3.8/site-packages/_pytest/python.py:493: in importtestmodule
mod = import_path(
.pixi/envs/default/lib/python3.8/site-packages/_pytest/pathlib.py:587: in import_path
importlib.import_module(module_name)
.pixi/envs/default/lib/python3.8/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
&lt;frozen importlib._bootstrap&gt;:1014: in _gcd_import
???
&lt;frozen importlib._bootstrap&gt;:991: in _find_and_load
???
&lt;frozen importlib._bootstrap&gt;:975: in _find_and_load_unlocked
???
&lt;frozen importlib._bootstrap&gt;:671: in _load_unlocked
???
.pixi/envs/default/lib/python3.8/site-packages/_pytest/assertion/rewrite.py:175: in exec_module
source_stat, co = _rewrite_test(fn, self.config)
.pixi/envs/default/lib/python3.8/site-packages/_pytest/assertion/rewrite.py:355: in _rewrite_test
tree = ast.parse(source, filename=strfn)
.pixi/envs/default/lib/python3.8/ast.py:47: in parse
return compile(source, filename, mode, flags,
E File "/workspace/tligui_y/slic/tests/test_broken_fct.py", line 8
E def test_valid_2():
E ^
E SyntaxError: invalid syntax</error></testcase><testcase classname="" name="tests.test_collector_error" time="0.000"><error message="collection failure">ImportError while importing test module '/workspace/tligui_y/slic/tests/test_collector_error.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
.pixi/envs/default/lib/python3.8/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/test_collector_error.py:1: in &lt;module&gt;
from no_existing_module.math_utils import *
E ModuleNotFoundError: No module named 'no_existing_module'</error></testcase><testcase classname="tests.test_io_utils" name="test_read_file" time="0.003" /><testcase classname="tests.test_io_utils" name="test_write_file" time="0.001" /><testcase classname="tests.test_io_utils" name="test_cause_io_error" time="0.000"><failure message="OSError: Forced IO Error for testing">def test_cause_io_error():
# Raises manual IOError to simulate IO failure
&gt; cause_io_error()
tests/test_io_utils.py:25:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
def cause_io_error():
&gt; raise IOError("Forced IO Error for testing")
E OSError: Forced IO Error for testing
functions/io_utils.py:10: OSError</failure></testcase><testcase classname="tests.test_io_utils" name="test_file_not_found" time="0.000"><failure message="FileNotFoundError: [Errno 2] No such file or directory: 'nonexistent.file'">def test_file_not_found():
# Reading non-existing file raises FileNotFoundError
&gt; read_file("nonexistent.file")
tests/test_io_utils.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
path = 'nonexistent.file'
def read_file(path):
&gt; with open(path, "r", encoding="utf-8") as f:
E FileNotFoundError: [Errno 2] No such file or directory: 'nonexistent.file'
functions/io_utils.py:2: FileNotFoundError</failure></testcase><testcase classname="tests.test_io_utils" name="test_permission_error" time="0.000"><failure message="PermissionError: Permission denied">monkeypatch = &lt;_pytest.monkeypatch.MonkeyPatch object at 0x7f65176f0b20&gt;
def test_permission_error(monkeypatch):
# Patch open to raise PermissionError simulating access denial
def raise_perm_error(*args, **kwargs):
raise PermissionError("Permission denied")
monkeypatch.setattr("builtins.open", raise_perm_error)
&gt; read_file("anyfile.txt")
tests/test_io_utils.py:36:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
functions/io_utils.py:2: in read_file
with open(path, "r", encoding="utf-8") as f:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = ('anyfile.txt', 'r'), kwargs = {'encoding': 'utf-8'}
def raise_perm_error(*args, **kwargs):
&gt; raise PermissionError("Permission denied")
E PermissionError: Permission denied
tests/test_io_utils.py:34: PermissionError</failure></testcase><testcase classname="tests.test_io_utils" name="test_mock_open_error" time="0.003"><failure message="OSError: Mocked IOError">monkeypatch = &lt;_pytest.monkeypatch.MonkeyPatch object at 0x7f65176ec070&gt;
def test_mock_open_error(monkeypatch):
# Mock open() to raise IOError simulating read error
mocked_open = mock.mock_open()
mocked_open.side_effect = IOError("Mocked IOError")
monkeypatch.setattr("builtins.open", mocked_open)
&gt; with open("file.txt", "r") as f:
tests/test_io_utils.py:43:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.pixi/envs/default/lib/python3.8/unittest/mock.py:1081: in __call__
return self._mock_call(*args, **kwargs)
.pixi/envs/default/lib/python3.8/unittest/mock.py:1085: in _mock_call
return self._execute_mock_call(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = &lt;MagicMock name='open' spec='builtin_function_or_method' id='140072161559216'&gt;
args = ('file.txt', 'r'), kwargs = {}, effect = OSError('Mocked IOError')
def _execute_mock_call(self, /, *args, **kwargs):
# separate from _increment_mock_call so that awaited functions are
# executed separately from their call, also AsyncMock overrides this method
effect = self.side_effect
if effect is not None:
if _is_exception(effect):
&gt; raise effect
E OSError: Mocked IOError
.pixi/envs/default/lib/python3.8/unittest/mock.py:1140: OSError</failure></testcase><testcase classname="tests.test_io_utils" name="test_file_handle_closed_error" time="0.000"><failure message="ValueError: I/O operation on closed file">def test_file_handle_closed_error():
# Accessing closed file raises ValueError
f = io.StringIO("content")
f.close()
&gt; f.read()
E ValueError: I/O operation on closed file
tests/test_io_utils.py:50: ValueError</failure></testcase><testcase classname="tests.test_io_utils" name="test_os_error" time="0.000"><failure message="OSError: Simulated OSError">monkeypatch = &lt;_pytest.monkeypatch.MonkeyPatch object at 0x7f65178be280&gt;
def test_os_error(monkeypatch):
# Patch os.remove to raise OSError simulating filesystem error
def raise_os_error(path):
raise OSError("Simulated OSError")
monkeypatch.setattr("os.remove", raise_os_error)
&gt; os.remove("file.txt")
tests/test_io_utils.py:57:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
path = 'file.txt'
def raise_os_error(path):
&gt; raise OSError("Simulated OSError")
E OSError: Simulated OSError
tests/test_io_utils.py:55: OSError</failure></testcase><testcase classname="tests.test_io_utils" name="test_write_file_readonly" time="0.002" /><testcase classname="tests.test_io_utils" name="test_file_not_found_error" time="0.000"><failure message="FileNotFoundError: [Errno 2] No such file or directory: 'no_such_file.txt'">def test_file_not_found_error():
# Raises FileNotFoundError when opening a non-existent file
&gt; open("no_such_file.txt", "r")
E FileNotFoundError: [Errno 2] No such file or directory: 'no_such_file.txt'
tests/test_io_utils.py:69: FileNotFoundError</failure></testcase><testcase classname="tests.test_math_utils" name="test_broken" time="0.000"><failure message="NameError: name 'want_the_test_to_fail' is not defined">def test_broken():
# simulating a broken or faulty test implementation that will cause the test to error
&gt; want_the_test_to_fail
E NameError: name 'want_the_test_to_fail' is not defined
tests/test_math_utils.py:16: NameError</failure></testcase><testcase classname="tests.test_math_utils" name="test_call_missing_function" time="0.000"><failure message="AttributeError: module 'functions.math_utils' has no attribute 'non_existent_function'">def test_call_missing_function():
# Accessing a missing function attribute raises AttributeError
&gt; getattr(math_utils, "non_existent_function")()
E AttributeError: module 'functions.math_utils' has no attribute 'non_existent_function'
tests/test_math_utils.py:20: AttributeError</failure></testcase><testcase classname="tests.test_math_utils" name="test_addition_pass[2-2-4]" time="0.000" /><testcase classname="tests.test_math_utils" name="test_addition_pass[1-5-6]" time="0.000" /><testcase classname="tests.test_math_utils" name="test_addition_pass[3-4-7]" time="0.000" /><testcase classname="tests.test_math_utils" name="test_addition_pass[3-5-8]" time="0.000" /><testcase classname="tests.test_math_utils" name="test_addition_pass[3-6-9]" time="0.000" /><testcase classname="tests.test_math_utils" name="test_addition_pass_id[a=2,b=2,expected=4]" time="0.000" /><testcase classname="tests.test_math_utils" name="test_addition_pass_id[a=1,b=5,expected=6]" time="0.000" /><testcase classname="tests.test_math_utils" name="test_addition_pass_id[a=3,b=4,expected=7]" time="0.000" /><testcase classname="tests.test_math_utils" name="test_addition_fail" time="0.000"><failure message="assert 4 == 5&#10; + where 4 = addition(2, 2)">def test_addition_fail():
# Assertion failure: expected incorrect result
&gt; assert addition(2, 2) == 5
E assert 4 == 5
E + where 4 = addition(2, 2)
tests/test_math_utils.py:48: AssertionError</failure></testcase><testcase classname="tests.test_math_utils" name="test_division_zero" time="0.000"><failure message="ZeroDivisionError: division by zero">def test_division_zero():
# Will raise ZeroDivisionError if not handled in division
&gt; division(1, 0)
tests/test_math_utils.py:52:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
a = 1, b = 0
def division(a, b):
&gt; return a / b
E ZeroDivisionError: division by zero
functions/math_utils.py:5: ZeroDivisionError</failure></testcase><testcase classname="tests.test_math_utils" name="test_multiply_xfail" time="0.000"><skipped type="pytest.xfail" message="Expected failure" /></testcase><testcase classname="tests.test_math_utils" name="test_runtime_error" time="0.000"><failure message="RuntimeError: Forced runtime error">def test_runtime_error():
# Test raises an uncaught RuntimeError
&gt; raise RuntimeError("Forced runtime error")
E RuntimeError: Forced runtime error
tests/test_math_utils.py:61: RuntimeError</failure></testcase><testcase classname="tests.test_math_utils" name="test_memory_error" time="0.000"><failure message="MemoryError: Simulated memory error">def test_memory_error():
# Manually raise MemoryError to simulate out-of-memory condition
&gt; raise MemoryError("Simulated memory error")
E MemoryError: Simulated memory error
tests/test_math_utils.py:65: MemoryError</failure></testcase><testcase classname="tests.test_math_utils" name="test_timeout_error" time="0.000"><failure message="TimeoutError: Simulated timeout error">def test_timeout_error():
# Manually raise TimeoutError simulating timeout conditions
&gt; raise TimeoutError("Simulated timeout error")
E TimeoutError: Simulated timeout error
tests/test_math_utils.py:69: TimeoutError</failure></testcase><testcase classname="tests.test_math_utils" name="test_recursion_error" time="0.001"><failure message="RecursionError: maximum recursion depth exceeded">def test_recursion_error():
# Infinite recursion triggers RecursionError
def recursive():
return recursive()
&gt; recursive()
tests/test_math_utils.py:75:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/test_math_utils.py:74: in recursive
return recursive()
tests/test_math_utils.py:74: in recursive
return recursive()
E RecursionError: maximum recursion depth exceeded
!!! Recursion detected (same locals &amp; position)</failure></testcase><testcase classname="tests.test_math_utils" name="test_floating_point_error" time="0.000"><failure message="FloatingPointError: Simulated floating point error">def test_floating_point_error():
# Manually raise FloatingPointError (rare in practice)
&gt; raise FloatingPointError("Simulated floating point error")
E FloatingPointError: Simulated floating point error
tests/test_math_utils.py:79: FloatingPointError</failure></testcase><testcase classname="tests.test_math_utils" name="test_floating_point_overflow" time="0.000"><failure message="OverflowError: math range error">def test_floating_point_overflow():
# Exponential overflow triggers OverflowError
&gt; math.exp(1000)
E OverflowError: math range error
tests/test_math_utils.py:83: OverflowError</failure></testcase><testcase classname="tests.test_math_utils" name="test_value_error" time="0.000"><failure message="ValueError: invalid literal for int() with base 10: 'invalid'">def test_value_error():
# ValueError on invalid integer conversion
&gt; int("invalid")
E ValueError: invalid literal for int() with base 10: 'invalid'
tests/test_math_utils.py:87: ValueError</failure></testcase><testcase classname="tests.test_math_utils" name="test_type_error" time="0.000"><failure message="TypeError: 'int' object is not iterable">def test_type_error():
# TypeError when passing wrong argument type to sum
&gt; sum(5)
E TypeError: 'int' object is not iterable
tests/test_math_utils.py:91: TypeError</failure></testcase><testcase classname="tests.test_math_utils" name="test_unhandled_exception" time="0.000"><failure message="Exception: Generic unhandled exception">def test_unhandled_exception():
# Raises generic unhandled Exception
&gt; raise Exception("Generic unhandled exception")
E Exception: Generic unhandled exception
tests/test_math_utils.py:95: Exception</failure></testcase><testcase classname="tests.test_math_utils" name="test_custom_error" time="0.000"><failure message="test_math_utils.CustomError: Custom error simulation">def test_custom_error():
# Raises user-defined CustomError exception
&gt; raise CustomError("Custom error simulation")
E test_math_utils.CustomError: Custom error simulation
tests/test_math_utils.py:99: CustomError</failure></testcase><testcase classname="tests.test_math_utils" name="test_stop_iteration_direct" time="0.000"><failure message="RuntimeError: generator raised StopIteration">def test_stop_iteration_direct():
# Directly raise StopIteration exception
&gt; raise StopIteration()
E StopIteration
tests/test_math_utils.py:103: StopIteration
The above exception was the direct cause of the following exception:
cls = &lt;class '_pytest.runner.CallInfo'&gt;
func = &lt;function call_and_report.&lt;locals&gt;.&lt;lambda&gt; at 0x7f651747b550&gt;
when = 'call'
reraise = (&lt;class '_pytest.outcomes.Exit'&gt;, &lt;class 'KeyboardInterrupt'&gt;)
@classmethod
def from_call(
cls,
func: Callable[[], TResult],
when: Literal["collect", "setup", "call", "teardown"],
reraise: type[BaseException] | tuple[type[BaseException], ...] | None = None,
) -&gt; CallInfo[TResult]:
"""Call func, wrapping the result in a CallInfo.
:param func:
The function to call. Called without arguments.
:type func: Callable[[], _pytest.runner.TResult]
:param when:
The phase in which the function is called.
:param reraise:
Exception or exceptions that shall propagate if raised by the
function, instead of being wrapped in the CallInfo.
"""
excinfo = None
start = timing.time()
precise_start = timing.perf_counter()
try:
&gt; result: TResult | None = func()
.pixi/envs/default/lib/python3.8/site-packages/_pytest/runner.py:341:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.pixi/envs/default/lib/python3.8/site-packages/_pytest/runner.py:242: in &lt;lambda&gt;
lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise
.pixi/envs/default/lib/python3.8/site-packages/pluggy/_hooks.py:513: in __call__
return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
.pixi/envs/default/lib/python3.8/site-packages/pluggy/_manager.py:120: in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
.pixi/envs/default/lib/python3.8/site-packages/_pytest/threadexception.py:92: in pytest_runtest_call
yield from thread_exception_runtest_hook()
.pixi/envs/default/lib/python3.8/site-packages/_pytest/threadexception.py:68: in thread_exception_runtest_hook
yield
.pixi/envs/default/lib/python3.8/site-packages/_pytest/unraisableexception.py:95: in pytest_runtest_call
yield from unraisable_exception_runtest_hook()
.pixi/envs/default/lib/python3.8/site-packages/_pytest/unraisableexception.py:70: in unraisable_exception_runtest_hook
yield
.pixi/envs/default/lib/python3.8/site-packages/_pytest/logging.py:846: in pytest_runtest_call
yield from self._runtest_for(item, "call")
.pixi/envs/default/lib/python3.8/site-packages/_pytest/logging.py:829: in _runtest_for
yield
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = &lt;CaptureManager _method='no' _global_capturing=&lt;MultiCapture out=None err=None in_=None _state='suspended' _in_suspended=False&gt; _capture_fixture=None&gt;
item = &lt;Function test_stop_iteration_direct&gt;
@hookimpl(wrapper=True)
def pytest_runtest_call(self, item: Item) -&gt; Generator[None]:
with self.item_capture("call", item):
&gt; return (yield)
E RuntimeError: generator raised StopIteration
.pixi/envs/default/lib/python3.8/site-packages/_pytest/capture.py:880: RuntimeError</failure></testcase><testcase classname="tests.test_math_utils" name="test_generator_exit_direct" time="0.000"><failure message="GeneratorExit">def test_generator_exit_direct():
# Directly raise GeneratorExit exception
&gt; raise GeneratorExit()
E GeneratorExit
tests/test_math_utils.py:107: GeneratorExit</failure></testcase><testcase classname="tests.test_math_utils" name="test_recursion_limit" time="0.000"><failure message="RecursionError: cannot set the recursion limit to 50 at the recursion depth 37: the limit is too low">def test_recursion_limit():
# Lower recursion limit to force RecursionError on deep recursion
original_limit = sys.getrecursionlimit()
&gt; sys.setrecursionlimit(50)
E RecursionError: cannot set the recursion limit to 50 at the recursion depth 37: the limit is too low
tests/test_math_utils.py:112: RecursionError</failure></testcase><testcase classname="tests.test_math_utils" name="test_malformed_code" time="0.000"><failure message=" File &quot;&lt;string&gt;&quot;, line 1&#10; def bad(:&#10; ^&#10;SyntaxError: invalid syntax">def test_malformed_code():
# SyntaxError when executing malformed Python code
&gt; exec("def bad(:\n pass")
E File "&lt;string&gt;", line 1
E def bad(:
E ^
E SyntaxError: invalid syntax
tests/test_math_utils.py:122: SyntaxError</failure></testcase><testcase classname="tests.test_math_utils" name="test_sys_exit" time="0.000"><failure message="SystemExit: 1">def test_sys_exit():
# Simulate SystemExit via sys.exit
&gt; sys.exit(1)
E SystemExit: 1
tests/test_math_utils.py:126: SystemExit</failure></testcase><testcase classname="tests.test_math_utils" name="test_broken_function" time="0.000"><failure message="TypeError: Broken function">def test_broken_function():
# Simulate broken function raising TypeError
def broken_func(*args, **kwargs):
raise TypeError("Broken function")
&gt; broken_func()
tests/test_math_utils.py:132:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (), kwargs = {}
def broken_func(*args, **kwargs):
&gt; raise TypeError("Broken function")
E TypeError: Broken function
tests/test_math_utils.py:131: TypeError</failure></testcase><testcase classname="tests.test_math_utils" name="test_import_error_patch" time="0.000"><failure message="ImportError: Simulated ImportError">def test_import_error_patch():
# Patch import to simulate ImportError on specific module
original_import = __import__
def fake_import(name, *args, **kwargs):
if name == "fake_module":
raise ImportError("Simulated ImportError")
return original_import(name, *args, **kwargs)
import builtins
builtins.__import__, old_import = fake_import, builtins.__import__
try:
&gt; __import__("fake_module")
tests/test_math_utils.py:144:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
name = 'fake_module', args = (), kwargs = {}
def fake_import(name, *args, **kwargs):
if name == "fake_module":
&gt; raise ImportError("Simulated ImportError")
E ImportError: Simulated ImportError
tests/test_math_utils.py:139: ImportError</failure></testcase><testcase classname="tests.test_math_utils" name="test_module_not_found_error" time="0.001"><failure message="ModuleNotFoundError: No module named 'non_existent_module_xyz'">def test_module_not_found_error():
# Raises ModuleNotFoundError (subclass of ImportError) for missing module
&gt; importlib.import_module("non_existent_module_xyz")
tests/test_math_utils.py:150:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.pixi/envs/default/lib/python3.8/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
&lt;frozen importlib._bootstrap&gt;:1014: in _gcd_import
???
&lt;frozen importlib._bootstrap&gt;:991: in _find_and_load
???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
name = 'non_existent_module_xyz'
import_ = &lt;function _gcd_import at 0x7f651bfa74c0&gt;
&gt; ???
E ModuleNotFoundError: No module named 'non_existent_module_xyz'
&lt;frozen importlib._bootstrap&gt;:973: ModuleNotFoundError</failure></testcase><testcase classname="tests.test_string_utils" name="test_uppercase_normal" time="0.000" /><testcase classname="tests.test_string_utils" name="test_uppercase_type_error" time="0.000"><failure message="TypeError: Input cannot be None">def test_uppercase_type_error():
# TypeError when input is None (invalid input)
&gt; uppercase(None)
tests/test_string_utils.py:14:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
s = None
def uppercase(s):
if s is None:
&gt; raise TypeError("Input cannot be None")
E TypeError: Input cannot be None
functions/string_utils.py:3: TypeError</failure></testcase><testcase classname="tests.test_string_utils" name="test_reverse_string" time="0.000" /><testcase classname="tests.test_string_utils" name="test_warning_emit" time="0.000" /><testcase classname="tests.test_string_utils" name="test_unicode_decode_error" time="0.000"><failure message="UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte">def test_unicode_decode_error():
# UnicodeDecodeError when decoding invalid byte sequence
&gt; b'\xff'.decode('utf-8')
E UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte
tests/test_string_utils.py:26: UnicodeDecodeError</failure></testcase><testcase classname="tests.test_string_utils" name="test_unicode_decode_surrogateescape" time="0.000"><failure message="UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte">def test_unicode_decode_surrogateescape():
# UnicodeDecodeError with strict error handler on invalid byte
&gt; b"\x80".decode("utf-8", errors="strict")
E UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte
tests/test_string_utils.py:30: UnicodeDecodeError</failure></testcase><testcase classname="tests.test_string_utils" name="test_import_warning" time="0.000" /><testcase classname="tests.test_string_utils" name="test_xfail_uppercase_digits" time="0.000"><skipped type="pytest.xfail" message="Expected failure: uppercase does not handle digits" /></testcase><testcase time="0.000" /></testsuite></testsuites>