188 KiB
188 KiB
⚠️ Test execution interrupted
The test run was interrupted by the user (reasons : KeyboardInterrupt or ...).
🪵 Full raw pytest log
============================= test session starts ==============================
platform linux -- Python 3.8.20, pytest-8.3.4, pluggy-1.5.0
rootdir: /workspace/tligui_y/slic
plugins: metadata-3.1.1, allure-pytest-2.13.5, cov-5.0.0, html-4.1.1, json-report-1.5.0, md-report-0.6.2
collected 72 items / 2 errors
tests/test_io_utils.py ..FFFFFF.F
tests/test_math_utils.py FF........FFxFFFFFFFFFFFFFFFFF
tests/test_param.py ...s.....E............F
tests/test_string_utils.py .F..FF.x
==================================== ERRORS ====================================
__________________ ERROR collecting tests/test_broken_fct.py ___________________
.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)
<frozen importlib._bootstrap>:1014: in _gcd_import
???
<frozen importlib._bootstrap>:991: in _find_and_load
???
<frozen importlib._bootstrap>:975: in _find_and_load_unlocked
???
<frozen importlib._bootstrap>: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 collecting tests/test_collector_error.py ________________
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 <module>
from no_existing_module.math_utils import *
E ModuleNotFoundError: No module named 'no_existing_module'
_______________ ERROR at setup of TestDynamic.test_sum_positive ________________
file /workspace/tligui_y/slic/tests/test_param.py, line 71
def test_sum_positive(self, x, y):
E fixture 'x' not found
> available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, complex_setup, cov, doctest_namespace, element, extra, extras, include_metadata_in_junit_xml, json_metadata, metadata, monkeypatch, no_cover, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
> use 'pytest --fixtures [testpath]' for help on them.
/workspace/tligui_y/slic/tests/test_param.py:71
=================================== FAILURES ===================================
_____________________________ test_cause_io_error ______________________________
def test_cause_io_error():
# Raises manual IOError to simulate IO failure
> cause_io_error()
tests/test_io_utils.py:25:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
def cause_io_error():
> raise IOError("Forced IO Error for testing")
E OSError: Forced IO Error for testing
functions/io_utils.py:10: OSError
_____________________________ test_file_not_found ______________________________
def test_file_not_found():
# Reading non-existing file raises FileNotFoundError
> read_file("nonexistent.file")
tests/test_io_utils.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
path = 'nonexistent.file'
def read_file(path):
> 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
____________________________ test_permission_error _____________________________
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f0a92d4b520>
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)
> 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):
> raise PermissionError("Permission denied")
E PermissionError: Permission denied
tests/test_io_utils.py:34: PermissionError
_____________________________ test_mock_open_error _____________________________
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f0a92d76550>
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)
> 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 = <MagicMock name='open' spec='builtin_function_or_method' id='139683389992000'>
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):
> raise effect
E OSError: Mocked IOError
.pixi/envs/default/lib/python3.8/unittest/mock.py:1140: OSError
________________________ test_file_handle_closed_error _________________________
def test_file_handle_closed_error():
# Accessing closed file raises ValueError
f = io.StringIO("content")
f.close()
> f.read()
E ValueError: I/O operation on closed file
tests/test_io_utils.py:50: ValueError
________________________________ test_os_error _________________________________
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f0a92d76a30>
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)
> os.remove("file.txt")
tests/test_io_utils.py:57:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
path = 'file.txt'
def raise_os_error(path):
> raise OSError("Simulated OSError")
E OSError: Simulated OSError
tests/test_io_utils.py:55: OSError
__________________________ test_file_not_found_error ___________________________
def test_file_not_found_error():
# Raises FileNotFoundError when opening a non-existent file
> 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
_________________________________ test_broken __________________________________
def test_broken():
# simulating a broken or faulty test implementation that will cause the test to error
> want_the_test_to_fail
E NameError: name 'want_the_test_to_fail' is not defined
tests/test_math_utils.py:16: NameError
__________________________ test_call_missing_function __________________________
def test_call_missing_function():
# Accessing a missing function attribute raises AttributeError
> 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
______________________________ test_addition_fail ______________________________
def test_addition_fail():
# Assertion failure: expected incorrect result
> assert addition(2, 2) == 5
E assert 4 == 5
E + where 4 = addition(2, 2)
tests/test_math_utils.py:51: AssertionError
______________________________ test_division_zero ______________________________
def test_division_zero():
# Will raise ZeroDivisionError if not handled in division
> division(1, 0)
tests/test_math_utils.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
a = 1, b = 0
def division(a, b):
> return a / b
E ZeroDivisionError: division by zero
functions/math_utils.py:5: ZeroDivisionError
______________________________ test_runtime_error ______________________________
def test_runtime_error():
# Test raises an uncaught RuntimeError
> raise RuntimeError("Forced runtime error")
E RuntimeError: Forced runtime error
tests/test_math_utils.py:64: RuntimeError
______________________________ test_memory_error _______________________________
def test_memory_error():
# Manually raise MemoryError to simulate out-of-memory condition
> raise MemoryError("Simulated memory error")
E MemoryError: Simulated memory error
tests/test_math_utils.py:68: MemoryError
______________________________ test_timeout_error ______________________________
def test_timeout_error():
# Manually raise TimeoutError simulating timeout conditions
> raise TimeoutError("Simulated timeout error")
E TimeoutError: Simulated timeout error
tests/test_math_utils.py:72: TimeoutError
_____________________________ test_recursion_error _____________________________
def test_recursion_error():
# Infinite recursion triggers RecursionError
def recursive():
return recursive()
> recursive()
tests/test_math_utils.py:78:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/test_math_utils.py:77: in recursive
return recursive()
tests/test_math_utils.py:77: in recursive
return recursive()
E RecursionError: maximum recursion depth exceeded
!!! Recursion detected (same locals & position)
__________________________ test_floating_point_error ___________________________
def test_floating_point_error():
# Manually raise FloatingPointError
> raise FloatingPointError("Simulated floating point error")
E FloatingPointError: Simulated floating point error
tests/test_math_utils.py:82: FloatingPointError
_________________________ test_floating_point_overflow _________________________
def test_floating_point_overflow():
# Exponential overflow triggers OverflowError
> math.exp(1000)
E OverflowError: math range error
tests/test_math_utils.py:86: OverflowError
_______________________________ test_value_error _______________________________
def test_value_error():
# ValueError on invalid integer conversion
> int("invalid")
E ValueError: invalid literal for int() with base 10: 'invalid'
tests/test_math_utils.py:90: ValueError
__________________________ test_wrong_argument_error ___________________________
def test_wrong_argument_error():
# TypeError when passing wrong argument type to sum
> sum(5)
E TypeError: 'int' object is not iterable
tests/test_math_utils.py:94: TypeError
___________________________ test_unhandled_exception ___________________________
def test_unhandled_exception():
# Raises generic unhandled Exception
> raise Exception("Generic unhandled exception")
E Exception: Generic unhandled exception
tests/test_math_utils.py:98: Exception
______________________________ test_custom_error _______________________________
def test_custom_error():
# Raises user-defined CustomError exception
> raise CustomError("Custom error simulation")
E test_math_utils.CustomError: Custom error simulation
tests/test_math_utils.py:102: CustomError
__________________________ test_stop_iteration_direct __________________________
def test_stop_iteration_direct():
# Directly raise StopIteration exception
> raise StopIteration()
E StopIteration
tests/test_math_utils.py:106: StopIteration
The above exception was the direct cause of the following exception:
cls = <class '_pytest.runner.CallInfo'>
func = <function call_and_report.<locals>.<lambda> at 0x7f0a928fb700>
when = 'call'
reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)
@classmethod
def from_call(
cls,
func: Callable[[], TResult],
when: Literal["collect", "setup", "call", "teardown"],
reraise: type[BaseException] | tuple[type[BaseException], ...] | None = None,
) -> 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:
> 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 <lambda>
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 = <CaptureManager _method='no' _global_capturing=<MultiCapture out=None err=None in_=None _state='suspended' _in_suspended=False> _capture_fixture=None>
item = <Function test_stop_iteration_direct>
@hookimpl(wrapper=True)
def pytest_runtest_call(self, item: Item) -> Generator[None]:
with self.item_capture("call", item):
> return (yield)
E RuntimeError: generator raised StopIteration
.pixi/envs/default/lib/python3.8/site-packages/_pytest/capture.py:880: RuntimeError
__________________________ test_generator_exit_direct __________________________
def test_generator_exit_direct():
# Directly raise GeneratorExit exception
> raise GeneratorExit()
E GeneratorExit
tests/test_math_utils.py:110: GeneratorExit
_____________________________ test_malformed_code ______________________________
def test_malformed_code():
# SyntaxError when executing malformed Python code
> exec("def bad(:\n pass")
E File "<string>", line 1
E def bad(:
E ^
E SyntaxError: invalid syntax
tests/test_math_utils.py:114: SyntaxError
________________________________ test_sys_exit _________________________________
def test_sys_exit():
# Simulate SystemExit via sys.exit
> sys.exit(1)
E SystemExit: 1
tests/test_math_utils.py:118: SystemExit
_____________________________ test_broken_function _____________________________
def test_broken_function():
# Simulate broken function raising TypeError
def broken_func(*args, **kwargs):
raise TypeError("Broken function")
> broken_func()
tests/test_math_utils.py:124:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (), kwargs = {}
def broken_func(*args, **kwargs):
> raise TypeError("Broken function")
E TypeError: Broken function
tests/test_math_utils.py:123: TypeError
______________________________ test_import_error _______________________________
def test_import_error():
> raise ImportError("Simulated ImportError")
E ImportError: Simulated ImportError
tests/test_math_utils.py:127: ImportError
_________________________ test_module_not_found_error __________________________
def test_module_not_found_error():
# Raises ModuleNotFoundError (subclass of ImportError) for missing module
> importlib.import_module("non_existent_module_xyz")
tests/test_math_utils.py:131:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.pixi/envs/default/lib/python3.8/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1014: in _gcd_import
???
<frozen importlib._bootstrap>:991: in _find_and_load
???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
name = 'non_existent_module_xyz'
import_ = <function _gcd_import at 0x7f0a971474c0>
> ???
E ModuleNotFoundError: No module named 'non_existent_module_xyz'
<frozen importlib._bootstrap>:973: ModuleNotFoundError
________________________________ test_addition _________________________________
a = 5, b = 5, expected = 10
def test_addition(a = 5, b = 5, expected = 10):
# Has to pass
> assert addition(a, b) == expected
E NameError: name 'addition' is not defined
tests/test_param.py:107: NameError
__________________________ test_uppercase_type_error ___________________________
def test_uppercase_type_error():
# TypeError when input is None (invalid input)
> uppercase(None)
tests/test_string_utils.py:16:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
s = None
def uppercase(s):
if s is None:
> raise TypeError("Input cannot be None")
E TypeError: Input cannot be None
functions/string_utils.py:3: TypeError
__________________________ test_unicode_decode_error ___________________________
def test_unicode_decode_error():
# UnicodeDecodeError when decoding invalid byte sequence
> 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:28: UnicodeDecodeError
_____________________ test_unicode_decode_surrogateescape ______________________
def test_unicode_decode_surrogateescape():
# UnicodeDecodeError with strict error handler on invalid byte
> 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:32: UnicodeDecodeError
=============================== warnings summary ===============================
tests/test_string_utils.py::test_warning_emit
/workspace/tligui_y/slic/tests/test_string_utils.py:24: UserWarning: Test warning
warnings.warn("Test warning", UserWarning)
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
--------------------------------- JSON report ----------------------------------
report saved to: ci-reports/markdown/pytest-report.json
---------- coverage: platform linux, python 3.8.20-final-0 -----------
Coverage HTML written to dir ci-reports/coverage/
Coverage XML written to file ci-reports/coverage/coverage.xml
=========================== short test summary info ============================
FAILED tests/test_io_utils.py::test_cause_io_error - OSError: Forced IO Error for testing
FAILED tests/test_io_utils.py::test_file_not_found - FileNotFoundError: [Errno 2] No such file or directory: 'nonexistent.file'
FAILED tests/test_io_utils.py::test_permission_error - PermissionError: Permission denied
FAILED tests/test_io_utils.py::test_mock_open_error - OSError: Mocked IOError
FAILED tests/test_io_utils.py::test_file_handle_closed_error - ValueError: I/O operation on closed file
FAILED tests/test_io_utils.py::test_os_error - OSError: Simulated OSError
FAILED tests/test_io_utils.py::test_file_not_found_error - FileNotFoundError: [Errno 2] No such file or directory: 'no_such_file.txt'
FAILED tests/test_math_utils.py::test_broken - NameError: name 'want_the_test_to_fail' is not defined
FAILED tests/test_math_utils.py::test_call_missing_function - AttributeError: module 'functions.math_utils' has no attribute 'non_existent_function'
FAILED tests/test_math_utils.py::test_addition_fail - assert 4 == 5
+ where 4 = addition(2, 2)
FAILED tests/test_math_utils.py::test_division_zero - ZeroDivisionError: division by zero
FAILED tests/test_math_utils.py::test_runtime_error - RuntimeError: Forced runtime error
FAILED tests/test_math_utils.py::test_memory_error - MemoryError: Simulated memory error
FAILED tests/test_math_utils.py::test_timeout_error - TimeoutError: Simulated timeout error
FAILED tests/test_math_utils.py::test_recursion_error - RecursionError: maximum recursion depth exceeded
FAILED tests/test_math_utils.py::test_floating_point_error - FloatingPointError: Simulated floating point error
FAILED tests/test_math_utils.py::test_floating_point_overflow - OverflowError: math range error
FAILED tests/test_math_utils.py::test_value_error - ValueError: invalid literal for int() with base 10: 'invalid'
FAILED tests/test_math_utils.py::test_wrong_argument_error - TypeError: 'int' object is not iterable
FAILED tests/test_math_utils.py::test_unhandled_exception - Exception: Generic unhandled exception
FAILED tests/test_math_utils.py::test_custom_error - test_math_utils.CustomError: Custom error simulation
FAILED tests/test_math_utils.py::test_stop_iteration_direct - RuntimeError: generator raised StopIteration
FAILED tests/test_math_utils.py::test_generator_exit_direct - GeneratorExit
FAILED tests/test_math_utils.py::test_malformed_code - File "<string>", line 1
def bad(:
^
SyntaxError: invalid syntax
FAILED tests/test_math_utils.py::test_sys_exit - SystemExit: 1
FAILED tests/test_math_utils.py::test_broken_function - TypeError: Broken function
FAILED tests/test_math_utils.py::test_import_error - ImportError: Simulated ImportError
FAILED tests/test_math_utils.py::test_module_not_found_error - ModuleNotFoundError: No module named 'non_existent_module_xyz'
FAILED tests/test_param.py::test_addition - NameError: name 'addition' is not defined
FAILED tests/test_string_utils.py::test_uppercase_type_error - TypeError: Input cannot be None
FAILED tests/test_string_utils.py::test_unicode_decode_error - UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte
FAILED tests/test_string_utils.py::test_unicode_decode_surrogateescape - UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte
ERROR tests/test_broken_fct.py
ERROR tests/test_collector_error.py
ERROR tests/test_param.py::TestDynamic::test_sum_positive
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! KeyboardInterrupt !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
/workspace/tligui_y/slic/tests/test_string_utils.py:52: KeyboardInterrupt
(to show a full traceback on KeyboardInterrupt use --full-trace)
=== 32 failed, 35 passed, 1 skipped, 2 xfailed, 1 warning, 3 errors in 0.77s ===
🧪 Test Report
Generated on 2025-07-17 12:57:40
🧾 General Info
- duration: 0.7686643600463867
- root: /workspace/tligui_y/slic
- environment:
📋 Summary
- Passed: 36
- Failed: 32
- Xfailed: 2
- Skipped: 1
- Error: 1
- Total: 72
- Collected: 72
🔎 Tests
✅ Passed (36)
📁 test_io_utils.py
🔧 Function: `test_read_file`
✅ #1
📌 Runtime Parameters
🔧 Setup Phase
📌 Duration
0.003061530995182693
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.00040166592225432396
📌 Outcome
passed
🔧 Teardown Phase
📌 Duration
0.0002309569390490651
📌 Outcome
passed
🔧 Function: `test_write_file`
✅ #2
📌 Runtime Parameters
🔧 Setup Phase
📌 Duration
0.0004485159879550338
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.0002946000313386321
📌 Outcome
passed
🔧 Teardown Phase
📌 Duration
0.00013904098886996508
📌 Outcome
passed
🔧 Function: `test_write_file_readonly`
✅ #9
📌 Runtime Parameters
🔧 Setup Phase
📌 Duration
0.0007073919987305999
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.0009686429984867573
📌 Outcome
passed
🔧 Teardown Phase
📌 Duration
0.00015265005640685558
📌 Outcome
passed
📁 test_math_utils.py
🔧 Function: `test_addition_pass`
✅ #13 params: a=2, b=2, expected=4
📌 Runtime Parameters
id: 2-2-4
marks:
params: a: 2
b: 2
expected: 4
🔧 Setup Phase
📌 Duration
0.0003402769798412919
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.00015228299889713526
📌 Outcome
passed
🔧 Teardown Phase
📌 Duration
0.00016410311218351126
📌 Outcome
passed
✅ #14 params: a=1, b=5, expected=6
📌 Runtime Parameters
id: 1-5-6
marks:
params: a: 1
b: 5
expected: 6
🔧 Setup Phase
📌 Duration
0.00026776595041155815
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.00015462294686585665
📌 Outcome
passed
🔧 Teardown Phase
📌 Duration
0.00014649296645075083
📌 Outcome
passed
✅ #15 params: a=3, b=4, expected=7
📌 Runtime Parameters
id: 3-4-7
marks:
params: a: 3
b: 4
expected: 7
🔧 Setup Phase
📌 Duration
0.00025113194715231657
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.0001401189947500825
📌 Outcome
passed
🔧 Teardown Phase
📌 Duration
0.00014662707690149546
📌 Outcome
passed
✅ #16 params: a=3, b=5, expected=8
📌 Runtime Parameters
id: 3-5-8
marks:
params: a: 3
b: 5
expected: 8
🔧 Setup Phase
📌 Duration
0.0002509730402380228
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.0001332019455730915
📌 Outcome
passed
🔧 Teardown Phase
📌 Duration
0.00013469799887388945
📌 Outcome
passed
✅ #17 params: a=3, b=6, expected=9
📌 Runtime Parameters
id: 3-6-9
marks:
params: a: 3
b: 6
expected: 9
🔧 Setup Phase
📌 Duration
0.00024719990324229
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.00013244303409010172
📌 Outcome
passed
🔧 Teardown Phase
📌 Duration
0.00019871501717716455
📌 Outcome
passed
🔧 Function: `test_addition_pass_id`
✅ #18 params: a=2, b=2, expected=4
📌 Runtime Parameters
id: a=2,b=2,expected=4
marks:
params: a: 2
b: 2
expected: 4
🔧 Setup Phase
📌 Duration
0.00026122794952243567
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.00013164302799850702
📌 Outcome
passed
🔧 Teardown Phase
📌 Duration
0.00013964902609586716
📌 Outcome
passed
✅ #19 params: a=1, b=5, expected=6
📌 Runtime Parameters
id: a=1,b=5,expected=6
marks:
params: a: 1
b: 5
expected: 6
🔧 Setup Phase
📌 Duration
0.0002579230349510908
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.00012996303848922253
📌 Outcome
passed
🔧 Teardown Phase
📌 Duration
0.0001324209151789546
📌 Outcome
passed
✅ #20 params: a=3, b=4, expected=7
📌 Runtime Parameters
id: a=3,b=4,expected=7
marks:
params: a: 3
b: 4
expected: 7
🔧 Setup Phase
📌 Duration
0.00025008199736475945
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.00012540805619210005
📌 Outcome
passed
🔧 Teardown Phase
📌 Duration
0.00014230795204639435
📌 Outcome
passed
📁 test_param.py
🔧 Function: `test_basic_ids`
✅ #41 params: x=1
📌 Runtime Parameters
id: one
marks:
params: x: 1
🔧 Setup Phase
📌 Duration
0.0002617130521684885
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.00015065399929881096
📌 Outcome
passed
🔧 Teardown Phase
📌 Duration
0.0001631900668144226
📌 Outcome
passed
✅ #42 params: x=2
📌 Runtime Parameters
id: two
marks:
params: x: 2
🔧 Setup Phase
📌 Duration
0.00019936100579798222
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.00013418507296591997
📌 Outcome
passed
🔧 Teardown Phase
📌 Duration
0.0001264300663024187
📌 Outcome
passed
🔧 Function: `test_with_reason_and_marks`
✅ #43 params: x=10
📌 Runtime Parameters
id: ten
marks:
params: x: 10
🔧 Setup Phase
📌 Duration
0.00017676001880317926
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.00014559307601302862
📌 Outcome
passed
🔧 Teardown Phase
📌 Duration
0.00012384506408125162
📌 Outcome
passed
🔧 Function: `test_multiple_positional_args`
✅ #45 params: a=1, b=2
📌 Runtime Parameters
id: 1-2
marks:
params: a: 1
b: 2
🔧 Setup Phase
📌 Duration
0.00023974699433892965
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.00014940695837140083
📌 Outcome
passed
🔧 Teardown Phase
📌 Duration
0.00013794400729238987
📌 Outcome
passed
✅ #46 params: a=3, b=4
📌 Runtime Parameters
id: 3-4
marks:
params: a: 3
b: 4
🔧 Setup Phase
📌 Duration
0.00020986096933484077
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.00014582695439457893
📌 Outcome
passed
🔧 Teardown Phase
📌 Duration
0.00013537402264773846
📌 Outcome
passed
🔧 Function: `test_non_literal_with_id`
✅ #47
📌 Runtime Parameters
id: custom-obj
marks:
params: {'data': <object object at 0x7f0a9291e960>}
🔧 Setup Phase
📌 Duration
0.00016870396211743355
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.00014169199857860804
📌 Outcome
passed
🔧 Teardown Phase
📌 Duration
0.0001256490359082818
📌 Outcome
passed
🔧 Function: `test_timedistance_v1`
✅ #48
📌 Runtime Parameters
id: a0-b0-expected0
marks:
params: {'a': datetime.datetime(2001, 12, 12, 0, 0), 'b': datetime.datetime(2001, 12, 11, 0, 0), 'expected': datetime.timedelta(days=1)}
🔧 Setup Phase
📌 Duration
0.00026894197799265385
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.00014270201791077852
📌 Outcome
passed
🔧 Teardown Phase
📌 Duration
0.00016119400970637798
📌 Outcome
passed
✅ #49
📌 Runtime Parameters
id: a1-b1-expected1
marks:
params: {'a': datetime.datetime(2001, 12, 11, 0, 0), 'b': datetime.datetime(2001, 12, 12, 0, 0), 'expected': datetime.timedelta(days=-1)}
🔧 Setup Phase
📌 Duration
0.0002681460464373231
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.00013109506107866764
📌 Outcome
passed
🔧 Teardown Phase
📌 Duration
0.0001480280188843608
📌 Outcome
passed
🔧 Function: `test_dynamic`
✅ #51 params: val=10
📌 Runtime Parameters
id: ten
marks:
params: val: 10
🔧 Setup Phase
📌 Duration
0.00019332708325237036
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.00013750593643635511
📌 Outcome
passed
🔧 Teardown Phase
📌 Duration
0.00012976897414773703
📌 Outcome
passed
✅ #52 params: val=20
📌 Runtime Parameters
id: twenty
marks:
params: val: 20
🔧 Setup Phase
📌 Duration
0.00018239801283925772
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.00013742002192884684
📌 Outcome
passed
🔧 Teardown Phase
📌 Duration
0.00013528205454349518
📌 Outcome
passed
✅ #53 params: val=30
📌 Runtime Parameters
id: thirty
marks:
params: val: 30
🔧 Setup Phase
📌 Duration
0.00017375207971781492
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.00012700899969786406
📌 Outcome
passed
🔧 Teardown Phase
📌 Duration
0.00012178800534456968
📌 Outcome
passed
🔧 Function: `test_element_type`
✅ #54 params: element=fire
📌 Runtime Parameters
id: \U0001f525
marks:
params: element: fire
🔧 Setup Phase
📌 Duration
0.000185595010407269
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.00013192207552492619
📌 Outcome
passed
🔧 Teardown Phase
📌 Duration
0.00012424704618752003
📌 Outcome
passed
✅ #55 params: element=water
📌 Runtime Parameters
id: \U0001f4a7
marks:
params: element: water
🔧 Setup Phase
📌 Duration
0.00017815292812883854
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.00012919306755065918
📌 Outcome
passed
🔧 Teardown Phase
📌 Duration
0.00012062094174325466
📌 Outcome
passed
✅ #56 params: element=earth
📌 Runtime Parameters
id: \U0001f30d
marks:
params: element: earth
🔧 Setup Phase
📌 Duration
0.00017611810471862555
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.00013334793038666248
📌 Outcome
passed
🔧 Teardown Phase
📌 Duration
0.00012266100384294987
📌 Outcome
passed
🔧 Function: `test_combination`
✅ #57 params: y=a, x=1
📌 Runtime Parameters
id: a-1
marks:
params: y: a
x: 1
🔧 Setup Phase
📌 Duration
0.00021067692432552576
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.00012870400678366423
📌 Outcome
passed
🔧 Teardown Phase
📌 Duration
0.00013846298679709435
📌 Outcome
passed
✅ #58 params: y=a, x=2
📌 Runtime Parameters
id: a-2
marks:
params: y: a
x: 2
🔧 Setup Phase
📌 Duration
0.00022841000463813543
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.00013159599620848894
📌 Outcome
passed
🔧 Teardown Phase
📌 Duration
0.0001384878996759653
📌 Outcome
passed
✅ #59 params: y=b, x=1
📌 Runtime Parameters
id: b-1
marks:
params: y: b
x: 1
🔧 Setup Phase
📌 Duration
0.0002173910615965724
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.0001379289897158742
📌 Outcome
passed
🔧 Teardown Phase
📌 Duration
0.00013272708747535944
📌 Outcome
passed
✅ #60 params: y=b, x=2
📌 Runtime Parameters
id: b-2
marks:
params: y: b
x: 2
🔧 Setup Phase
📌 Duration
0.0002061250852420926
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.00014073296915739775
📌 Outcome
passed
🔧 Teardown Phase
📌 Duration
0.00015582703053951263
📌 Outcome
passed
🔧 Function: `test_indirect_fixture`
✅ #61 params: complex_setup=1
📌 Runtime Parameters
id: 1
marks:
params: complex_setup: 1
🔧 Setup Phase
📌 Duration
0.00018170604016631842
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.00014184904284775257
📌 Outcome
passed
🔧 Teardown Phase
📌 Duration
0.00026123097632080317
📌 Outcome
passed
✅ #62 params: complex_setup=2
📌 Runtime Parameters
id: 2
marks:
params: complex_setup: 2
🔧 Setup Phase
📌 Duration
0.0002087079919874668
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.00015469209756702185
📌 Outcome
passed
🔧 Teardown Phase
📌 Duration
0.0001297489507123828
📌 Outcome
passed
📁 test_string_utils.py
🔧 Function: `test_uppercase_normal`
✅ #64
📌 Runtime Parameters
🔧 Setup Phase
📌 Duration
0.00014512601774185896
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.0001521629747003317
📌 Outcome
passed
🔧 Teardown Phase
📌 Duration
0.00011778890620917082
📌 Outcome
passed
🔧 Function: `test_reverse_string`
✅ #66
📌 Runtime Parameters
🔧 Setup Phase
📌 Duration
0.00012179696932435036
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.00015486497431993484
📌 Outcome
passed
🔧 Teardown Phase
📌 Duration
0.0001054280437529087
📌 Outcome
passed
🔧 Function: `test_warning_emit`
✅ #67
📌 Runtime Parameters
🔧 Setup Phase
📌 Duration
0.0001131650060415268
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.00016114593017846346
📌 Outcome
passed
🔧 Teardown Phase
📌 Duration
9.896804112941027e-05
📌 Outcome
passed
🔧 Function: `test_import_warning`
✅ #70
📌 Runtime Parameters
🔧 Setup Phase
📌 Duration
0.00012189196422696114
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.000153709901496768
📌 Outcome
passed
🔧 Teardown Phase
📌 Duration
0.00010752503294497728
📌 Outcome
passed
🔧 Function: `test_keyboard_interrupt_direct`
✅ #72
📌 Runtime Parameters
🔧 Setup Phase
📌 Duration
0.00013420695904642344
📌 Outcome
passed
❌ Failed (32)
📁 test_io_utils.py
🔧 Function: `test_cause_io_error`
❌ #3
📌 Runtime Parameters
🔧 Setup Phase
📌 Duration
0.00011115300003439188
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.00016092800069600344
📌 Outcome
failed
📌 Crash
path: /workspace/tligui_y/slic/functions/io_utils.py
lineno: 10
message: OSError: Forced IO Error for testing
📌 Traceback
path: tests/test_io_utils.py
lineno: 25
message: None
path: functions/io_utils.py
lineno: 10
message: OSError
📌 Longrepr
def test_cause_io_error():
# Raises manual IOError to simulate IO failure
> cause_io_error()
tests/test_io_utils.py:25:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
def cause_io_error():
> raise IOError("Forced IO Error for testing")
E OSError: Forced IO Error for testing
functions/io_utils.py:10: OSError
🔧 Teardown Phase
📌 Duration
0.00013689196202903986
📌 Outcome
passed
🔧 Function: `test_file_not_found`
❌ #4
📌 Runtime Parameters
🔧 Setup Phase
📌 Duration
0.00011640496086329222
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.00017964199651032686
📌 Outcome
failed
📌 Crash
path: /workspace/tligui_y/slic/functions/io_utils.py
lineno: 2
message: FileNotFoundError: [Errno 2] No such file or directory: 'nonexistent.file'
📌 Traceback
path: tests/test_io_utils.py
lineno: 29
message: None
path: functions/io_utils.py
lineno: 2
message: FileNotFoundError
📌 Longrepr
def test_file_not_found():
# Reading non-existing file raises FileNotFoundError
> read_file("nonexistent.file")
tests/test_io_utils.py:29:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
path = 'nonexistent.file'
def read_file(path):
> 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
🔧 Teardown Phase
📌 Duration
0.000135085079818964
📌 Outcome
passed
🔧 Function: `test_permission_error`
❌ #5
📌 Runtime Parameters
🔧 Setup Phase
📌 Duration
0.000195822911337018
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.00017941906116902828
📌 Outcome
failed
📌 Crash
path: /workspace/tligui_y/slic/tests/test_io_utils.py
lineno: 34
message: PermissionError: Permission denied
📌 Traceback
path: tests/test_io_utils.py
lineno: 36
message: None
path: functions/io_utils.py
lineno: 2
message: in read_file
path: tests/test_io_utils.py
lineno: 34
message: PermissionError
📌 Longrepr
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f0a92d4b520>
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)
> 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):
> raise PermissionError("Permission denied")
E PermissionError: Permission denied
tests/test_io_utils.py:34: PermissionError
🔧 Teardown Phase
📌 Duration
0.0001630149781703949
📌 Outcome
passed
🔧 Function: `test_mock_open_error`
❌ #6
📌 Runtime Parameters
🔧 Setup Phase
📌 Duration
0.0001875460147857666
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.0031941679771989584
📌 Outcome
failed
📌 Crash
path: /workspace/tligui_y/slic/.pixi/envs/default/lib/python3.8/unittest/mock.py
lineno: 1140
message: OSError: Mocked IOError
📌 Traceback
path: tests/test_io_utils.py
lineno: 43
message: None
path: .pixi/envs/default/lib/python3.8/unittest/mock.py
lineno: 1081
message: in __call__
path: .pixi/envs/default/lib/python3.8/unittest/mock.py
lineno: 1085
message: in _mock_call
path: .pixi/envs/default/lib/python3.8/unittest/mock.py
lineno: 1140
message: OSError
📌 Longrepr
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f0a92d76550>
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)
> 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 = <MagicMock name='open' spec='builtin_function_or_method' id='139683389992000'>
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):
> raise effect
E OSError: Mocked IOError
.pixi/envs/default/lib/python3.8/unittest/mock.py:1140: OSError
🔧 Teardown Phase
📌 Duration
0.00032785895746201277
📌 Outcome
passed
🔧 Function: `test_file_handle_closed_error`
❌ #7
📌 Runtime Parameters
🔧 Setup Phase
📌 Duration
0.00014014600310474634
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.00019203894771635532
📌 Outcome
failed
📌 Crash
path: /workspace/tligui_y/slic/tests/test_io_utils.py
lineno: 50
message: ValueError: I/O operation on closed file
📌 Traceback
path: tests/test_io_utils.py
lineno: 50
message: ValueError
📌 Longrepr
def test_file_handle_closed_error():
# Accessing closed file raises ValueError
f = io.StringIO("content")
f.close()
> f.read()
E ValueError: I/O operation on closed file
tests/test_io_utils.py:50: ValueError
🔧 Teardown Phase
📌 Duration
0.0002131899818778038
📌 Outcome
passed
🔧 Function: `test_os_error`
❌ #8
📌 Runtime Parameters
🔧 Setup Phase
📌 Duration
0.0002949860645458102
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.00020159303676337004
📌 Outcome
failed
📌 Crash
path: /workspace/tligui_y/slic/tests/test_io_utils.py
lineno: 55
message: OSError: Simulated OSError
📌 Traceback
path: tests/test_io_utils.py
lineno: 57
message: None
path: tests/test_io_utils.py
lineno: 55
message: OSError
📌 Longrepr
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f0a92d76a30>
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)
> os.remove("file.txt")
tests/test_io_utils.py:57:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
path = 'file.txt'
def raise_os_error(path):
> raise OSError("Simulated OSError")
E OSError: Simulated OSError
tests/test_io_utils.py:55: OSError
🔧 Teardown Phase
📌 Duration
0.00020143704023212194
📌 Outcome
passed
🔧 Function: `test_file_not_found_error`
❌ #10
📌 Runtime Parameters
🔧 Setup Phase
📌 Duration
0.00012058299034833908
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.00017363904044032097
📌 Outcome
failed
📌 Crash
path: /workspace/tligui_y/slic/tests/test_io_utils.py
lineno: 69
message: FileNotFoundError: [Errno 2] No such file or directory: 'no_such_file.txt'
📌 Traceback
path: tests/test_io_utils.py
lineno: 69
message: FileNotFoundError
📌 Longrepr
def test_file_not_found_error():
# Raises FileNotFoundError when opening a non-existent file
> 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
🔧 Teardown Phase
📌 Duration
0.00017369992565363646
📌 Outcome
passed
📁 test_math_utils.py
🔧 Function: `test_broken`
❌ #11
📌 Runtime Parameters
🔧 Setup Phase
📌 Duration
0.00013829104136675596
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.00016320100985467434
📌 Outcome
failed
📌 Crash
path: /workspace/tligui_y/slic/tests/test_math_utils.py
lineno: 16
message: NameError: name 'want_the_test_to_fail' is not defined
📌 Traceback
path: tests/test_math_utils.py
lineno: 16
message: NameError
📌 Longrepr
def test_broken():
# simulating a broken or faulty test implementation that will cause the test to error
> want_the_test_to_fail
E NameError: name 'want_the_test_to_fail' is not defined
tests/test_math_utils.py:16: NameError
🔧 Teardown Phase
📌 Duration
0.00014692696277052164
📌 Outcome
passed
🔧 Function: `test_call_missing_function`
❌ #12
📌 Runtime Parameters
🔧 Setup Phase
📌 Duration
0.00016260810662060976
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.0001658709952607751
📌 Outcome
failed
📌 Crash
path: /workspace/tligui_y/slic/tests/test_math_utils.py
lineno: 20
message: AttributeError: module 'functions.math_utils' has no attribute 'non_existent_function'
📌 Traceback
path: tests/test_math_utils.py
lineno: 20
message: AttributeError
📌 Longrepr
def test_call_missing_function():
# Accessing a missing function attribute raises AttributeError
> 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
🔧 Teardown Phase
📌 Duration
0.00015413598157465458
📌 Outcome
passed
🔧 Function: `test_addition_fail`
❌ #21
📌 Runtime Parameters
🔧 Setup Phase
📌 Duration
0.00013091193977743387
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.0004954959731549025
📌 Outcome
failed
📌 Crash
path: /workspace/tligui_y/slic/tests/test_math_utils.py
lineno: 51
message: assert 4 == 5
+ where 4 = addition(2, 2)
📌 Traceback
path: tests/test_math_utils.py
lineno: 51
message: AssertionError
📌 Longrepr
def test_addition_fail():
# Assertion failure: expected incorrect result
> assert addition(2, 2) == 5
E assert 4 == 5
E + where 4 = addition(2, 2)
tests/test_math_utils.py:51: AssertionError
🔧 Teardown Phase
📌 Duration
0.00015981006436049938
📌 Outcome
passed
🔧 Function: `test_division_zero`
❌ #22
📌 Runtime Parameters
🔧 Setup Phase
📌 Duration
0.00012887094635516405
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.00017330003902316093
📌 Outcome
failed
📌 Crash
path: /workspace/tligui_y/slic/functions/math_utils.py
lineno: 5
message: ZeroDivisionError: division by zero
📌 Traceback
path: tests/test_math_utils.py
lineno: 55
message: None
path: functions/math_utils.py
lineno: 5
message: ZeroDivisionError
📌 Longrepr
def test_division_zero():
# Will raise ZeroDivisionError if not handled in division
> division(1, 0)
tests/test_math_utils.py:55:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
a = 1, b = 0
def division(a, b):
> return a / b
E ZeroDivisionError: division by zero
functions/math_utils.py:5: ZeroDivisionError
🔧 Teardown Phase
📌 Duration
0.00015743891708552837
📌 Outcome
passed
🔧 Function: `test_runtime_error`
❌ #24
📌 Runtime Parameters
🔧 Setup Phase
📌 Duration
0.00013021891936659813
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.00016132695600390434
📌 Outcome
failed
📌 Crash
path: /workspace/tligui_y/slic/tests/test_math_utils.py
lineno: 64
message: RuntimeError: Forced runtime error
📌 Traceback
path: tests/test_math_utils.py
lineno: 64
message: RuntimeError
📌 Longrepr
def test_runtime_error():
# Test raises an uncaught RuntimeError
> raise RuntimeError("Forced runtime error")
E RuntimeError: Forced runtime error
tests/test_math_utils.py:64: RuntimeError
🔧 Teardown Phase
📌 Duration
0.00017315102741122246
📌 Outcome
passed
🔧 Function: `test_memory_error`
❌ #25
📌 Runtime Parameters
🔧 Setup Phase
📌 Duration
0.00013186107389628887
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.00018722598906606436
📌 Outcome
failed
📌 Crash
path: /workspace/tligui_y/slic/tests/test_math_utils.py
lineno: 68
message: MemoryError: Simulated memory error
📌 Traceback
path: tests/test_math_utils.py
lineno: 68
message: MemoryError
📌 Longrepr
def test_memory_error():
# Manually raise MemoryError to simulate out-of-memory condition
> raise MemoryError("Simulated memory error")
E MemoryError: Simulated memory error
tests/test_math_utils.py:68: MemoryError
🔧 Teardown Phase
📌 Duration
0.00016550999134778976
📌 Outcome
passed
🔧 Function: `test_timeout_error`
❌ #26
📌 Runtime Parameters
🔧 Setup Phase
📌 Duration
0.00014301505871117115
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.00015760294627398252
📌 Outcome
failed
📌 Crash
path: /workspace/tligui_y/slic/tests/test_math_utils.py
lineno: 72
message: TimeoutError: Simulated timeout error
📌 Traceback
path: tests/test_math_utils.py
lineno: 72
message: TimeoutError
📌 Longrepr
def test_timeout_error():
# Manually raise TimeoutError simulating timeout conditions
> raise TimeoutError("Simulated timeout error")
E TimeoutError: Simulated timeout error
tests/test_math_utils.py:72: TimeoutError
🔧 Teardown Phase
📌 Duration
0.00014451099559664726
📌 Outcome
passed
🔧 Function: `test_recursion_error`
❌ #27
📌 Runtime Parameters
🔧 Setup Phase
📌 Duration
0.0001292990054935217
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.0009431469952687621
📌 Outcome
failed
📌 Crash
path: /workspace/tligui_y/slic/tests/test_math_utils.py
lineno: 77
message: RecursionError: maximum recursion depth exceeded
📌 Traceback
path: tests/test_math_utils.py
lineno: 78
message: None
path: tests/test_math_utils.py
lineno: 77
message: in recursive
path: tests/test_math_utils.py
lineno: 77
message: in recursive
📌 Longrepr
def test_recursion_error():
# Infinite recursion triggers RecursionError
def recursive():
return recursive()
> recursive()
tests/test_math_utils.py:78:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/test_math_utils.py:77: in recursive
return recursive()
tests/test_math_utils.py:77: in recursive
return recursive()
E RecursionError: maximum recursion depth exceeded
!!! Recursion detected (same locals & position)
🔧 Teardown Phase
📌 Duration
0.0001559760421514511
📌 Outcome
passed
🔧 Function: `test_floating_point_error`
❌ #28
📌 Runtime Parameters
🔧 Setup Phase
📌 Duration
0.0001294909743592143
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.00016297795809805393
📌 Outcome
failed
📌 Crash
path: /workspace/tligui_y/slic/tests/test_math_utils.py
lineno: 82
message: FloatingPointError: Simulated floating point error
📌 Traceback
path: tests/test_math_utils.py
lineno: 82
message: FloatingPointError
📌 Longrepr
def test_floating_point_error():
# Manually raise FloatingPointError
> raise FloatingPointError("Simulated floating point error")
E FloatingPointError: Simulated floating point error
tests/test_math_utils.py:82: FloatingPointError
🔧 Teardown Phase
📌 Duration
0.0001409549731761217
📌 Outcome
passed
🔧 Function: `test_floating_point_overflow`
❌ #29
📌 Runtime Parameters
🔧 Setup Phase
📌 Duration
0.00013170798774808645
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.0001817760057747364
📌 Outcome
failed
📌 Crash
path: /workspace/tligui_y/slic/tests/test_math_utils.py
lineno: 86
message: OverflowError: math range error
📌 Traceback
path: tests/test_math_utils.py
lineno: 86
message: OverflowError
📌 Longrepr
def test_floating_point_overflow():
# Exponential overflow triggers OverflowError
> math.exp(1000)
E OverflowError: math range error
tests/test_math_utils.py:86: OverflowError
🔧 Teardown Phase
📌 Duration
0.00015668000560253859
📌 Outcome
passed
🔧 Function: `test_value_error`
❌ #30
📌 Runtime Parameters
🔧 Setup Phase
📌 Duration
0.00012792192865163088
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.00016239506658166647
📌 Outcome
failed
📌 Crash
path: /workspace/tligui_y/slic/tests/test_math_utils.py
lineno: 90
message: ValueError: invalid literal for int() with base 10: 'invalid'
📌 Traceback
path: tests/test_math_utils.py
lineno: 90
message: ValueError
📌 Longrepr
def test_value_error():
# ValueError on invalid integer conversion
> int("invalid")
E ValueError: invalid literal for int() with base 10: 'invalid'
tests/test_math_utils.py:90: ValueError
🔧 Teardown Phase
📌 Duration
0.0001453660661354661
📌 Outcome
passed
🔧 Function: `test_wrong_argument_error`
❌ #31
📌 Runtime Parameters
🔧 Setup Phase
📌 Duration
0.00012796197552233934
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.00015692110173404217
📌 Outcome
failed
📌 Crash
path: /workspace/tligui_y/slic/tests/test_math_utils.py
lineno: 94
message: TypeError: 'int' object is not iterable
📌 Traceback
path: tests/test_math_utils.py
lineno: 94
message: TypeError
📌 Longrepr
def test_wrong_argument_error():
# TypeError when passing wrong argument type to sum
> sum(5)
E TypeError: 'int' object is not iterable
tests/test_math_utils.py:94: TypeError
🔧 Teardown Phase
📌 Duration
0.00014484603889286518
📌 Outcome
passed
🔧 Function: `test_unhandled_exception`
❌ #32
📌 Runtime Parameters
🔧 Setup Phase
📌 Duration
0.00012910098303109407
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.0001633589854463935
📌 Outcome
failed
📌 Crash
path: /workspace/tligui_y/slic/tests/test_math_utils.py
lineno: 98
message: Exception: Generic unhandled exception
📌 Traceback
path: tests/test_math_utils.py
lineno: 98
message: Exception
📌 Longrepr
def test_unhandled_exception():
# Raises generic unhandled Exception
> raise Exception("Generic unhandled exception")
E Exception: Generic unhandled exception
tests/test_math_utils.py:98: Exception
🔧 Teardown Phase
📌 Duration
0.00014827994164079428
📌 Outcome
passed
🔧 Function: `test_custom_error`
❌ #33
📌 Runtime Parameters
🔧 Setup Phase
📌 Duration
0.000127198058180511
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.0001688649645075202
📌 Outcome
failed
📌 Crash
path: /workspace/tligui_y/slic/tests/test_math_utils.py
lineno: 102
message: test_math_utils.CustomError: Custom error simulation
📌 Traceback
path: tests/test_math_utils.py
lineno: 102
message: CustomError
📌 Longrepr
def test_custom_error():
# Raises user-defined CustomError exception
> raise CustomError("Custom error simulation")
E test_math_utils.CustomError: Custom error simulation
tests/test_math_utils.py:102: CustomError
🔧 Teardown Phase
📌 Duration
0.00015202700160443783
📌 Outcome
passed
🔧 Function: `test_stop_iteration_direct`
❌ #34
📌 Runtime Parameters
🔧 Setup Phase
📌 Duration
0.00012734101619571447
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.0001584240235388279
📌 Outcome
failed
📌 Crash
path: /workspace/tligui_y/slic/.pixi/envs/default/lib/python3.8/site-packages/_pytest/capture.py
lineno: 880
message: RuntimeError: generator raised StopIteration
📌 Traceback
path: .pixi/envs/default/lib/python3.8/site-packages/_pytest/runner.py
lineno: 341
message: None
path: .pixi/envs/default/lib/python3.8/site-packages/_pytest/runner.py
lineno: 242
message: in <lambda>
path: .pixi/envs/default/lib/python3.8/site-packages/pluggy/_hooks.py
lineno: 513
message: in __call__
path: .pixi/envs/default/lib/python3.8/site-packages/pluggy/_manager.py
lineno: 120
message: in _hookexec
path: .pixi/envs/default/lib/python3.8/site-packages/_pytest/threadexception.py
lineno: 92
message: in pytest_runtest_call
path: .pixi/envs/default/lib/python3.8/site-packages/_pytest/threadexception.py
lineno: 68
message: in thread_exception_runtest_hook
path: .pixi/envs/default/lib/python3.8/site-packages/_pytest/unraisableexception.py
lineno: 95
message: in pytest_runtest_call
path: .pixi/envs/default/lib/python3.8/site-packages/_pytest/unraisableexception.py
lineno: 70
message: in unraisable_exception_runtest_hook
path: .pixi/envs/default/lib/python3.8/site-packages/_pytest/logging.py
lineno: 846
message: in pytest_runtest_call
path: .pixi/envs/default/lib/python3.8/site-packages/_pytest/logging.py
lineno: 829
message: in _runtest_for
path: .pixi/envs/default/lib/python3.8/site-packages/_pytest/capture.py
lineno: 880
message: RuntimeError
📌 Longrepr
def test_stop_iteration_direct():
# Directly raise StopIteration exception
> raise StopIteration()
E StopIteration
tests/test_math_utils.py:106: StopIteration
The above exception was the direct cause of the following exception:
cls = <class '_pytest.runner.CallInfo'>
func = <function call_and_report.<locals>.<lambda> at 0x7f0a928fb700>
when = 'call'
reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)
@classmethod
def from_call(
cls,
func: Callable[[], TResult],
when: Literal["collect", "setup", "call", "teardown"],
reraise: type[BaseException] | tuple[type[BaseException], ...] | None = None,
) -> 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:
> 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 <lambda>
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 = <CaptureManager _method='no' _global_capturing=<MultiCapture out=None err=None in_=None _state='suspended' _in_suspended=False> _capture_fixture=None>
item = <Function test_stop_iteration_direct>
@hookimpl(wrapper=True)
def pytest_runtest_call(self, item: Item) -> Generator[None]:
with self.item_capture("call", item):
> return (yield)
E RuntimeError: generator raised StopIteration
.pixi/envs/default/lib/python3.8/site-packages/_pytest/capture.py:880: RuntimeError
🔧 Teardown Phase
📌 Duration
0.0002604519249871373
📌 Outcome
passed
🔧 Function: `test_generator_exit_direct`
❌ #35
📌 Runtime Parameters
🔧 Setup Phase
📌 Duration
0.000176700996235013
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.00018002605065703392
📌 Outcome
failed
📌 Crash
path: /workspace/tligui_y/slic/tests/test_math_utils.py
lineno: 110
message: GeneratorExit
📌 Traceback
path: tests/test_math_utils.py
lineno: 110
message: GeneratorExit
📌 Longrepr
def test_generator_exit_direct():
# Directly raise GeneratorExit exception
> raise GeneratorExit()
E GeneratorExit
tests/test_math_utils.py:110: GeneratorExit
🔧 Teardown Phase
📌 Duration
0.00018354994244873524
📌 Outcome
passed
🔧 Function: `test_malformed_code`
❌ #36
📌 Runtime Parameters
🔧 Setup Phase
📌 Duration
0.00015007692854851484
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.00017871602904051542
📌 Outcome
failed
📌 Crash
path: /workspace/tligui_y/slic/tests/test_math_utils.py
lineno: 114
message: File "<string>", line 1
def bad(:
^
SyntaxError: invalid syntax
📌 Traceback
path: tests/test_math_utils.py
lineno: 114
message: SyntaxError
📌 Longrepr
def test_malformed_code():
# SyntaxError when executing malformed Python code
> exec("def bad(:\n pass")
E File "<string>", line 1
E def bad(:
E ^
E SyntaxError: invalid syntax
tests/test_math_utils.py:114: SyntaxError
🔧 Teardown Phase
📌 Duration
0.0001655110390856862
📌 Outcome
passed
🔧 Function: `test_sys_exit`
❌ #37
📌 Runtime Parameters
🔧 Setup Phase
📌 Duration
0.00013621198013424873
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.00016006897203624249
📌 Outcome
failed
📌 Crash
path: /workspace/tligui_y/slic/tests/test_math_utils.py
lineno: 118
message: SystemExit: 1
📌 Traceback
path: tests/test_math_utils.py
lineno: 118
message: SystemExit
📌 Longrepr
def test_sys_exit():
# Simulate SystemExit via sys.exit
> sys.exit(1)
E SystemExit: 1
tests/test_math_utils.py:118: SystemExit
🔧 Teardown Phase
📌 Duration
0.0001537570497021079
📌 Outcome
passed
🔧 Function: `test_broken_function`
❌ #38
📌 Runtime Parameters
🔧 Setup Phase
📌 Duration
0.00012668000999838114
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.00017143308650702238
📌 Outcome
failed
📌 Crash
path: /workspace/tligui_y/slic/tests/test_math_utils.py
lineno: 123
message: TypeError: Broken function
📌 Traceback
path: tests/test_math_utils.py
lineno: 124
message: None
path: tests/test_math_utils.py
lineno: 123
message: TypeError
📌 Longrepr
def test_broken_function():
# Simulate broken function raising TypeError
def broken_func(*args, **kwargs):
raise TypeError("Broken function")
> broken_func()
tests/test_math_utils.py:124:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (), kwargs = {}
def broken_func(*args, **kwargs):
> raise TypeError("Broken function")
E TypeError: Broken function
tests/test_math_utils.py:123: TypeError
🔧 Teardown Phase
📌 Duration
0.000167321995832026
📌 Outcome
passed
🔧 Function: `test_import_error`
❌ #39
📌 Runtime Parameters
🔧 Setup Phase
📌 Duration
0.0001259640557691455
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.000156253925524652
📌 Outcome
failed
📌 Crash
path: /workspace/tligui_y/slic/tests/test_math_utils.py
lineno: 127
message: ImportError: Simulated ImportError
📌 Traceback
path: tests/test_math_utils.py
lineno: 127
message: ImportError
📌 Longrepr
def test_import_error():
> raise ImportError("Simulated ImportError")
E ImportError: Simulated ImportError
tests/test_math_utils.py:127: ImportError
🔧 Teardown Phase
📌 Duration
0.00014695292338728905
📌 Outcome
passed
🔧 Function: `test_module_not_found_error`
❌ #40
📌 Runtime Parameters
🔧 Setup Phase
📌 Duration
0.0001394529826939106
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.0005187669303268194
📌 Outcome
failed
📌 Crash
path: <frozen importlib._bootstrap>
lineno: 973
message: ModuleNotFoundError: No module named 'non_existent_module_xyz'
📌 Traceback
path: tests/test_math_utils.py
lineno: 131
message: None
path: .pixi/envs/default/lib/python3.8/importlib/__init__.py
lineno: 127
message: in import_module
path: <frozen importlib._bootstrap>
lineno: 1014
message: in _gcd_import
path: <frozen importlib._bootstrap>
lineno: 991
message: in _find_and_load
path: <frozen importlib._bootstrap>
lineno: 973
message: ModuleNotFoundError
📌 Longrepr
def test_module_not_found_error():
# Raises ModuleNotFoundError (subclass of ImportError) for missing module
> importlib.import_module("non_existent_module_xyz")
tests/test_math_utils.py:131:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.pixi/envs/default/lib/python3.8/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1014: in _gcd_import
???
<frozen importlib._bootstrap>:991: in _find_and_load
???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
name = 'non_existent_module_xyz'
import_ = <function _gcd_import at 0x7f0a971474c0>
> ???
E ModuleNotFoundError: No module named 'non_existent_module_xyz'
<frozen importlib._bootstrap>:973: ModuleNotFoundError
🔧 Teardown Phase
📌 Duration
0.00015894498210400343
📌 Outcome
passed
📁 test_param.py
🔧 Function: `test_addition`
❌ #63
📌 Runtime Parameters
🔧 Setup Phase
📌 Duration
0.00013034406583756208
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.00016851199325174093
📌 Outcome
failed
📌 Crash
path: /workspace/tligui_y/slic/tests/test_param.py
lineno: 107
message: NameError: name 'addition' is not defined
📌 Traceback
path: tests/test_param.py
lineno: 107
message: NameError
📌 Longrepr
a = 5, b = 5, expected = 10
def test_addition(a = 5, b = 5, expected = 10):
# Has to pass
> assert addition(a, b) == expected
E NameError: name 'addition' is not defined
tests/test_param.py:107: NameError
🔧 Teardown Phase
📌 Duration
0.0001569989835843444
📌 Outcome
passed
📁 test_string_utils.py
🔧 Function: `test_uppercase_type_error`
❌ #65
📌 Runtime Parameters
🔧 Setup Phase
📌 Duration
0.00011172494851052761
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.00015274202451109886
📌 Outcome
failed
📌 Crash
path: /workspace/tligui_y/slic/functions/string_utils.py
lineno: 3
message: TypeError: Input cannot be None
📌 Traceback
path: tests/test_string_utils.py
lineno: 16
message: None
path: functions/string_utils.py
lineno: 3
message: TypeError
📌 Longrepr
def test_uppercase_type_error():
# TypeError when input is None (invalid input)
> uppercase(None)
tests/test_string_utils.py:16:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
s = None
def uppercase(s):
if s is None:
> raise TypeError("Input cannot be None")
E TypeError: Input cannot be None
functions/string_utils.py:3: TypeError
🔧 Teardown Phase
📌 Duration
0.00014208396896719933
📌 Outcome
passed
🔧 Function: `test_unicode_decode_error`
❌ #68
📌 Runtime Parameters
🔧 Setup Phase
📌 Duration
0.00011881999671459198
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.0001722599845379591
📌 Outcome
failed
📌 Crash
path: /workspace/tligui_y/slic/tests/test_string_utils.py
lineno: 28
message: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte
📌 Traceback
path: tests/test_string_utils.py
lineno: 28
message: UnicodeDecodeError
📌 Longrepr
def test_unicode_decode_error():
# UnicodeDecodeError when decoding invalid byte sequence
> 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:28: UnicodeDecodeError
🔧 Teardown Phase
📌 Duration
0.0001391660189256072
📌 Outcome
passed
🔧 Function: `test_unicode_decode_surrogateescape`
❌ #69
📌 Runtime Parameters
🔧 Setup Phase
📌 Duration
0.00012017902918159962
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.000166269950568676
📌 Outcome
failed
📌 Crash
path: /workspace/tligui_y/slic/tests/test_string_utils.py
lineno: 32
message: UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte
📌 Traceback
path: tests/test_string_utils.py
lineno: 32
message: UnicodeDecodeError
📌 Longrepr
def test_unicode_decode_surrogateescape():
# UnicodeDecodeError with strict error handler on invalid byte
> 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:32: UnicodeDecodeError
🔧 Teardown Phase
📌 Duration
0.000136653077788651
📌 Outcome
passed
❌ Xfailed (2)
📁 test_math_utils.py
🔧 Function: `test_multiply_xfail`
❌ #23
📌 Runtime Parameters
🔧 Setup Phase
📌 Duration
0.00015089497901499271
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.0003022280288860202
📌 Outcome
skipped
📌 Crash
path: /workspace/tligui_y/slic/tests/test_math_utils.py
lineno: 60
message: assert 4 == 5
+ where 4 = multiply(2, 2)
📌 Traceback
path: tests/test_math_utils.py
lineno: 60
message: AssertionError
📌 Longrepr
@pytest.mark.xfail(reason="Expected failure")
def test_multiply_xfail():
# Expected fail test (xfail): incorrect expected multiply result
> assert multiply(2, 2) == 5
E assert 4 == 5
E + where 4 = multiply(2, 2)
tests/test_math_utils.py:60: AssertionError
🔧 Teardown Phase
📌 Duration
0.0001838579773902893
📌 Outcome
passed
📁 test_string_utils.py
🔧 Function: `test_xfail_uppercase_digits`
❌ #71
📌 Runtime Parameters
🔧 Setup Phase
📌 Duration
0.00013186491560190916
📌 Outcome
passed
🔧 Call Phase
📌 Duration
0.0006662909872829914
📌 Outcome
skipped
📌 Crash
path: /workspace/tligui_y/slic/tests/test_string_utils.py
lineno: 41
message: AssertionError: assert 'ABC123' == 'ABC1234'
- ABC1234
? -
+ ABC123
📌 Traceback
path: tests/test_string_utils.py
lineno: 41
message: AssertionError
📌 Longrepr
@pytest.mark.xfail(reason="Expected failure: uppercase does not handle digits")
def test_xfail_uppercase_digits():
# Expected fail test because uppercase won't change digits
> assert uppercase("abc123") == "ABC1234"
E AssertionError: assert 'ABC123' == 'ABC1234'
E
E - ABC1234
E ? -
E + ABC123
tests/test_string_utils.py:41: AssertionError
🔧 Teardown Phase
📌 Duration
0.00013853597920387983
📌 Outcome
passed
❌ Skipped (1)
📁 test_param.py
🔧 Function: `test_with_reason_and_marks`
❌ #44
📌 Runtime Parameters
🔧 Setup Phase
📌 Duration
0.00023672799579799175
📌 Outcome
skipped
📌 Longrepr
('/workspace/tligui_y/slic/tests/test_param.py', 12, 'Skipped: nope')
🔧 Teardown Phase
📌 Duration
0.00012518500443547964
📌 Outcome
passed
❌ Error (1)
📁 test_param.py
🔧 Function: `TestDynamic`
❌ #50
📌 Runtime Parameters
🔧 Setup Phase
📌 Duration
0.0001716669648885727
📌 Outcome
failed
📌 Longrepr
file /workspace/tligui_y/slic/tests/test_param.py, line 71
def test_sum_positive(self, x, y):
E fixture 'x' not found
> available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, complex_setup, cov, doctest_namespace, element, extra, extras, include_metadata_in_junit_xml, json_metadata, metadata, monkeypatch, no_cover, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
> use 'pytest --fixtures [testpath]' for help on them.
/workspace/tligui_y/slic/tests/test_param.py:71
🔧 Teardown Phase
📌 Duration
0.0001639300025999546
📌 Outcome
passed
📚 Collected files
✅ (1 tests)
✅
- Outcome:
passed - Details:
result:
nodeid: .
type: Dir
✅ ci-reports (12 tests)
✅ ci-reports
- Outcome:
passed - Details:
result:
nodeid: ci-reports/allure
type: Dir
nodeid: ci-reports/coverage
type: Dir
nodeid: ci-reports/markdown
type: Dir
✅ ci-reports/allure
- Outcome:
passed - Details:
result:
nodeid: ci-reports/allure/data
type: Dir
nodeid: ci-reports/allure/export
type: Dir
nodeid: ci-reports/allure/history
type: Dir
nodeid: ci-reports/allure/plugin
type: Dir
nodeid: ci-reports/allure/widgets
type: Dir
✅ ci-reports/allure/data
- Outcome:
passed - Details:
result:
✅ ci-reports/allure/export
- Outcome:
passed - Details:
result:
✅ ci-reports/allure/history
- Outcome:
passed - Details:
result:
✅ ci-reports/allure/plugin
- Outcome:
passed - Details:
result:
nodeid: ci-reports/allure/plugin/behaviors
type: Dir
nodeid: ci-reports/allure/plugin/packages
type: Dir
nodeid: ci-reports/allure/plugin/screen-diff
type: Dir
✅ ci-reports/allure/plugin/behaviors
- Outcome:
passed - Details:
result:
✅ ci-reports/allure/plugin/packages
- Outcome:
passed - Details:
result:
✅ ci-reports/allure/plugin/screen-diff
- Outcome:
passed - Details:
result:
✅ ci-reports/allure/widgets
- Outcome:
passed - Details:
result:
✅ ci-reports/coverage
- Outcome:
passed - Details:
result:
✅ ci-reports/markdown
- Outcome:
passed - Details:
result:
✅ functions (1 tests)
✅ functions
- Outcome:
passed - Details:
result:
❌ tests (8 tests)
✅ tests
- Outcome:
passed - Details:
result:
nodeid: tests/test_broken_fct.py
type: Module
nodeid: tests/test_collector_error.py
type: Module
nodeid: tests/test_io_utils.py
type: Module
nodeid: tests/test_math_utils.py
type: Module
nodeid: tests/test_param.py
type: Module
nodeid: tests/test_string_utils.py
type: Module
❌ tests/test_broken_fct.py
- Outcome:
failed - Details:
result:
longrepr:
.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)
<frozen importlib._bootstrap>:1014: in _gcd_import
???
<frozen importlib._bootstrap>:991: in _find_and_load
???
<frozen importlib._bootstrap>:975: in _find_and_load_unlocked
???
<frozen importlib._bootstrap>: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
❌ tests/test_collector_error.py
- Outcome:
failed - Details:
result:
longrepr:
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 <module>
from no_existing_module.math_utils import *
E ModuleNotFoundError: No module named 'no_existing_module'
✅ tests/test_io_utils.py
- Outcome:
passed - Details:
result:
nodeid: tests/test_io_utils.py::test_read_file
type: Function
lineno: 9
nodeid: tests/test_io_utils.py::test_write_file
type: Function
lineno: 16
nodeid: tests/test_io_utils.py::test_cause_io_error
type: Function
lineno: 22
nodeid: tests/test_io_utils.py::test_file_not_found
type: Function
lineno: 26
nodeid: tests/test_io_utils.py::test_permission_error
type: Function
lineno: 30
nodeid: tests/test_io_utils.py::test_mock_open_error
type: Function
lineno: 37
nodeid: tests/test_io_utils.py::test_file_handle_closed_error
type: Function
lineno: 45
nodeid: tests/test_io_utils.py::test_os_error
type: Function
lineno: 51
nodeid: tests/test_io_utils.py::test_write_file_readonly
type: Function
lineno: 58
nodeid: tests/test_io_utils.py::test_file_not_found_error
type: Function
lineno: 66
✅ tests/test_math_utils.py
- Outcome:
passed - Details:
result:
nodeid: tests/test_math_utils.py::test_broken
type: Function
lineno: 13
nodeid: tests/test_math_utils.py::test_call_missing_function
type: Function
lineno: 17
nodeid: tests/test_math_utils.py::test_addition_pass[2-2-4]
type: Function
lineno: 22
nodeid: tests/test_math_utils.py::test_addition_pass[1-5-6]
type: Function
lineno: 22
nodeid: tests/test_math_utils.py::test_addition_pass[3-4-7]
type: Function
lineno: 22
nodeid: tests/test_math_utils.py::test_addition_pass[3-5-8]
type: Function
lineno: 22
nodeid: tests/test_math_utils.py::test_addition_pass[3-6-9]
type: Function
lineno: 22
nodeid: tests/test_math_utils.py::test_addition_pass_id[a=2,b=2,expected=4]
type: Function
lineno: 36
nodeid: tests/test_math_utils.py::test_addition_pass_id[a=1,b=5,expected=6]
type: Function
lineno: 36
nodeid: tests/test_math_utils.py::test_addition_pass_id[a=3,b=4,expected=7]
type: Function
lineno: 36
nodeid: tests/test_math_utils.py::test_addition_fail
type: Function
lineno: 48
nodeid: tests/test_math_utils.py::test_division_zero
type: Function
lineno: 52
nodeid: tests/test_math_utils.py::test_multiply_xfail
type: Function
lineno: 56
nodeid: tests/test_math_utils.py::test_runtime_error
type: Function
lineno: 61
nodeid: tests/test_math_utils.py::test_memory_error
type: Function
lineno: 65
nodeid: tests/test_math_utils.py::test_timeout_error
type: Function
lineno: 69
nodeid: tests/test_math_utils.py::test_recursion_error
type: Function
lineno: 73
nodeid: tests/test_math_utils.py::test_floating_point_error
type: Function
lineno: 79
nodeid: tests/test_math_utils.py::test_floating_point_overflow
type: Function
lineno: 83
nodeid: tests/test_math_utils.py::test_value_error
type: Function
lineno: 87
nodeid: tests/test_math_utils.py::test_wrong_argument_error
type: Function
lineno: 91
nodeid: tests/test_math_utils.py::test_unhandled_exception
type: Function
lineno: 95
nodeid: tests/test_math_utils.py::test_custom_error
type: Function
lineno: 99
nodeid: tests/test_math_utils.py::test_stop_iteration_direct
type: Function
lineno: 103
nodeid: tests/test_math_utils.py::test_generator_exit_direct
type: Function
lineno: 107
nodeid: tests/test_math_utils.py::test_malformed_code
type: Function
lineno: 111
nodeid: tests/test_math_utils.py::test_sys_exit
type: Function
lineno: 115
nodeid: tests/test_math_utils.py::test_broken_function
type: Function
lineno: 119
nodeid: tests/test_math_utils.py::test_import_error
type: Function
lineno: 125
nodeid: tests/test_math_utils.py::test_module_not_found_error
type: Function
lineno: 128
✅ tests/test_param.py
- Outcome:
passed - Details:
result:
nodeid: tests/test_param.py::test_basic_ids[one]
type: Function
lineno: 3
nodeid: tests/test_param.py::test_basic_ids[two]
type: Function
lineno: 3
nodeid: tests/test_param.py::test_with_reason_and_marks[ten]
type: Function
lineno: 11
nodeid: tests/test_param.py::test_with_reason_and_marks[twenty]
type: Function
lineno: 11
nodeid: tests/test_param.py::test_multiple_positional_args[1-2]
type: Function
lineno: 19
nodeid: tests/test_param.py::test_multiple_positional_args[3-4]
type: Function
lineno: 19
nodeid: tests/test_param.py::test_non_literal_with_id[custom-obj]
type: Function
lineno: 27
nodeid: tests/test_param.py::test_timedistance_v1[a0-b0-expected0]
type: Function
lineno: 40
nodeid: tests/test_param.py::test_timedistance_v1[a1-b1-expected1]
type: Function
lineno: 40
nodeid: tests/test_param.py::TestDynamic
type: Class
nodeid: tests/test_param.py::test_dynamic[ten]
type: Function
lineno: 78
nodeid: tests/test_param.py::test_dynamic[twenty]
type: Function
lineno: 78
nodeid: tests/test_param.py::test_dynamic[thirty]
type: Function
lineno: 78
nodeid: tests/test_param.py::test_element_type[\U0001f525]
type: Function
lineno: 87
nodeid: tests/test_param.py::test_element_type[\U0001f4a7]
type: Function
lineno: 87
nodeid: tests/test_param.py::test_element_type[\U0001f30d]
type: Function
lineno: 87
nodeid: tests/test_param.py::test_combination[a-1]
type: Function
lineno: 90
nodeid: tests/test_param.py::test_combination[a-2]
type: Function
lineno: 90
nodeid: tests/test_param.py::test_combination[b-1]
type: Function
lineno: 90
nodeid: tests/test_param.py::test_combination[b-2]
type: Function
lineno: 90
nodeid: tests/test_param.py::test_indirect_fixture[1]
type: Function
lineno: 100
nodeid: tests/test_param.py::test_indirect_fixture[2]
type: Function
lineno: 100
nodeid: tests/test_param.py::test_addition
type: Function
lineno: 104
✅ tests/test_param.py::TestDynamic
- Outcome:
passed - Details:
result:
nodeid: tests/test_param.py::TestDynamic::test_sum_positive
type: Function
lineno: 70
✅ tests/test_string_utils.py
- Outcome:
passed - Details:
result:
nodeid: tests/test_string_utils.py::test_uppercase_normal
type: Function
lineno: 9
nodeid: tests/test_string_utils.py::test_uppercase_type_error
type: Function
lineno: 13
nodeid: tests/test_string_utils.py::test_reverse_string
type: Function
lineno: 17
nodeid: tests/test_string_utils.py::test_warning_emit
type: Function
lineno: 21
nodeid: tests/test_string_utils.py::test_unicode_decode_error
type: Function
lineno: 25
nodeid: tests/test_string_utils.py::test_unicode_decode_surrogateescape
type: Function
lineno: 29
nodeid: tests/test_string_utils.py::test_import_warning
type: Function
lineno: 33
nodeid: tests/test_string_utils.py::test_xfail_uppercase_digits
type: Function
lineno: 37
nodeid: tests/test_string_utils.py::test_keyboard_interrupt_direct
type: Function
lineno: 49
✅ . (1 tests)
✅ .
- Outcome:
passed - Details:
result:
nodeid: ci-reports
type: Dir
nodeid: functions
type: Package
nodeid: tests
type: Dir
⚠️ Warnings
Warnings #1
message: Test warning
category: UserWarning
when: runtest
filename: /workspace/tligui_y/slic/tests/test_string_utils.py
lineno: 24