770 lines
76 KiB
HTML
770 lines
76 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8"/>
|
|
<title id="head-title">pytest-report.html</title>
|
|
<link href="assets/style.css" rel="stylesheet" type="text/css"/>
|
|
</head>
|
|
<body>
|
|
<h1 id="title">pytest-report.html</h1>
|
|
<p>Report generated on 15-Jul-2025 at 12:23:32 by <a href="https://pypi.python.org/pypi/pytest-html">pytest-html</a>
|
|
v4.1.1</p>
|
|
<div id="environment-header">
|
|
<h2>Environment</h2>
|
|
</div>
|
|
<table id="environment"></table>
|
|
<!-- TEMPLATES -->
|
|
<template id="template_environment_row">
|
|
<tr>
|
|
<td></td>
|
|
<td></td>
|
|
</tr>
|
|
</template>
|
|
<template id="template_results-table__body--empty">
|
|
<tbody class="results-table-row">
|
|
<tr id="not-found-message">
|
|
<td colspan="4">No results found. Check the filters.</th>
|
|
</tr>
|
|
</template>
|
|
<template id="template_results-table__tbody">
|
|
<tbody class="results-table-row">
|
|
<tr class="collapsible">
|
|
</tr>
|
|
<tr class="extras-row">
|
|
<td class="extra" colspan="4">
|
|
<div class="extraHTML"></div>
|
|
<div class="media">
|
|
<div class="media-container">
|
|
<div class="media-container__nav--left"><</div>
|
|
<div class="media-container__viewport">
|
|
<img src="" />
|
|
<video controls>
|
|
<source src="" type="video/mp4">
|
|
</video>
|
|
</div>
|
|
<div class="media-container__nav--right">></div>
|
|
</div>
|
|
<div class="media__name"></div>
|
|
<div class="media__counter"></div>
|
|
</div>
|
|
<div class="logwrapper">
|
|
<div class="logexpander"></div>
|
|
<div class="log"></div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</template>
|
|
<!-- END TEMPLATES -->
|
|
<div class="summary">
|
|
<div class="summary__data">
|
|
<h2>Summary</h2>
|
|
<div class="additional-summary prefix">
|
|
</div>
|
|
<p class="run-count">49 tests took 24 ms.</p>
|
|
<p class="filter">(Un)check the boxes to filter the results.</p>
|
|
<div class="summary__reload">
|
|
<div class="summary__reload__button hidden" onclick="location.reload()">
|
|
<div>There are still tests running. <br />Reload this page to get the latest results!</div>
|
|
</div>
|
|
</div>
|
|
<div class="summary__spacer"></div>
|
|
<div class="controls">
|
|
<div class="filters">
|
|
<input checked="true" class="filter" name="filter_checkbox" type="checkbox" data-test-result="failed" />
|
|
<span class="failed">32 Failed,</span>
|
|
<input checked="true" class="filter" name="filter_checkbox" type="checkbox" data-test-result="passed" />
|
|
<span class="passed">15 Passed,</span>
|
|
<input checked="true" class="filter" name="filter_checkbox" type="checkbox" data-test-result="skipped" disabled/>
|
|
<span class="skipped">0 Skipped,</span>
|
|
<input checked="true" class="filter" name="filter_checkbox" type="checkbox" data-test-result="xfailed" />
|
|
<span class="xfailed">2 Expected failures,</span>
|
|
<input checked="true" class="filter" name="filter_checkbox" type="checkbox" data-test-result="xpassed" disabled/>
|
|
<span class="xpassed">0 Unexpected passes,</span>
|
|
<input checked="true" class="filter" name="filter_checkbox" type="checkbox" data-test-result="error" />
|
|
<span class="error">2 Errors,</span>
|
|
<input checked="true" class="filter" name="filter_checkbox" type="checkbox" data-test-result="rerun" disabled/>
|
|
<span class="rerun">0 Reruns</span>
|
|
</div>
|
|
<div class="collapse">
|
|
<button id="show_all_details">Show all details</button> / <button id="hide_all_details">Hide all details</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="additional-summary summary">
|
|
</div>
|
|
<div class="additional-summary postfix">
|
|
</div>
|
|
</div>
|
|
<table id="results-table">
|
|
<thead id="results-table-head">
|
|
<tr>
|
|
<th class="sortable" data-column-type="result">Result</th>
|
|
<th class="sortable" data-column-type="testId">Test</th>
|
|
<th class="sortable" data-column-type="duration">Duration</th>
|
|
<th>Links</th>
|
|
</tr>
|
|
</thead>
|
|
</table>
|
|
</body>
|
|
<footer>
|
|
<div id="data-container" data-jsonblob="{"environment": {"Python": "3.8.20", "Platform": "Linux-5.14.0-570.24.1.el9_6.x86_64-x86_64-with-glibc2.17", "Packages": {"pytest": "8.3.4", "pluggy": "1.5.0"}, "Plugins": {"metadata": "3.1.1", "cov": "5.0.0", "allure-pytest": "2.13.5", "html": "4.1.1", "md-report": "0.6.2", "json-report": "1.5.0"}, "CI": "true"}, "tests": {"tests/test_broken_fct.py": [{"extras": [], "result": "Error", "testId": "tests/test_broken_fct.py::collect", "duration": "0 ms", "resultsTableRow": ["<td class=\"col-result\">Error</td>", "<td class=\"col-testId\">tests/test_broken_fct.py::collect</td>", "<td class=\"col-duration\">0 ms</td>", "<td class=\"col-links\"></td>"], "log": ".pixi/envs/default/lib/python3.8/site-packages/_pytest/python.py:493: in importtestmodule\n mod = import_path(\n.pixi/envs/default/lib/python3.8/site-packages/_pytest/pathlib.py:587: in import_path\n importlib.import_module(module_name)\n.pixi/envs/default/lib/python3.8/importlib/__init__.py:127: in import_module\n return _bootstrap._gcd_import(name[level:], package, level)\n&lt;frozen importlib._bootstrap&gt;:1014: in _gcd_import\n ???\n&lt;frozen importlib._bootstrap&gt;:991: in _find_and_load\n ???\n&lt;frozen importlib._bootstrap&gt;:975: in _find_and_load_unlocked\n ???\n&lt;frozen importlib._bootstrap&gt;:671: in _load_unlocked\n ???\n.pixi/envs/default/lib/python3.8/site-packages/_pytest/assertion/rewrite.py:175: in exec_module\n source_stat, co = _rewrite_test(fn, self.config)\n.pixi/envs/default/lib/python3.8/site-packages/_pytest/assertion/rewrite.py:355: in _rewrite_test\n tree = ast.parse(source, filename=strfn)\n.pixi/envs/default/lib/python3.8/ast.py:47: in parse\n return compile(source, filename, mode, flags,\nE File &quot;/workspace/tligui_y/slic/tests/test_broken_fct.py&quot;, line 8\nE def test_valid_2():\nE ^\nE SyntaxError: invalid syntax\n"}], "tests/test_collector_error.py": [{"extras": [], "result": "Error", "testId": "tests/test_collector_error.py::collect", "duration": "0 ms", "resultsTableRow": ["<td class=\"col-result\">Error</td>", "<td class=\"col-testId\">tests/test_collector_error.py::collect</td>", "<td class=\"col-duration\">0 ms</td>", "<td class=\"col-links\"></td>"], "log": "ImportError while importing test module &#x27;/workspace/tligui_y/slic/tests/test_collector_error.py&#x27;.\nHint: make sure your test modules/packages have valid Python names.\nTraceback:\n.pixi/envs/default/lib/python3.8/importlib/__init__.py:127: in import_module\n return _bootstrap._gcd_import(name[level:], package, level)\ntests/test_collector_error.py:1: in &lt;module&gt;\n from no_existing_module.math_utils import *\nE ModuleNotFoundError: No module named &#x27;no_existing_module&#x27;\n"}], "tests/test_io_utils.py::test_read_file": [{"extras": [], "result": "Passed", "testId": "tests/test_io_utils.py::test_read_file", "duration": "3 ms", "resultsTableRow": ["<td class=\"col-result\">Passed</td>", "<td class=\"col-testId\">tests/test_io_utils.py::test_read_file</td>", "<td class=\"col-duration\">3 ms</td>", "<td class=\"col-links\"></td>"], "log": "No log output captured."}], "tests/test_io_utils.py::test_write_file": [{"extras": [], "result": "Passed", "testId": "tests/test_io_utils.py::test_write_file", "duration": "1 ms", "resultsTableRow": ["<td class=\"col-result\">Passed</td>", "<td class=\"col-testId\">tests/test_io_utils.py::test_write_file</td>", "<td class=\"col-duration\">1 ms</td>", "<td class=\"col-links\"></td>"], "log": "No log output captured."}], "tests/test_io_utils.py::test_cause_io_error": [{"extras": [], "result": "Failed", "testId": "tests/test_io_utils.py::test_cause_io_error", "duration": "0 ms", "resultsTableRow": ["<td class=\"col-result\">Failed</td>", "<td class=\"col-testId\">tests/test_io_utils.py::test_cause_io_error</td>", "<td class=\"col-duration\">0 ms</td>", "<td class=\"col-links\"></td>"], "log": "def test_cause_io_error():\n # Raises manual IOError to simulate IO failure\n&gt; cause_io_error()\n\ntests/test_io_utils.py:25: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\n def cause_io_error():\n&gt; raise IOError(&quot;Forced IO Error for testing&quot;)\nE OSError: Forced IO Error for testing\n\nfunctions/io_utils.py:10: OSError\n"}], "tests/test_io_utils.py::test_file_not_found": [{"extras": [], "result": "Failed", "testId": "tests/test_io_utils.py::test_file_not_found", "duration": "0 ms", "resultsTableRow": ["<td class=\"col-result\">Failed</td>", "<td class=\"col-testId\">tests/test_io_utils.py::test_file_not_found</td>", "<td class=\"col-duration\">0 ms</td>", "<td class=\"col-links\"></td>"], "log": "def test_file_not_found():\n # Reading non-existing file raises FileNotFoundError\n&gt; read_file(&quot;nonexistent.file&quot;)\n\ntests/test_io_utils.py:29: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\npath = &#x27;nonexistent.file&#x27;\n\n def read_file(path):\n&gt; with open(path, &quot;r&quot;, encoding=&quot;utf-8&quot;) as f:\nE FileNotFoundError: [Errno 2] No such file or directory: &#x27;nonexistent.file&#x27;\n\nfunctions/io_utils.py:2: FileNotFoundError\n"}], "tests/test_io_utils.py::test_permission_error": [{"extras": [], "result": "Failed", "testId": "tests/test_io_utils.py::test_permission_error", "duration": "0 ms", "resultsTableRow": ["<td class=\"col-result\">Failed</td>", "<td class=\"col-testId\">tests/test_io_utils.py::test_permission_error</td>", "<td class=\"col-duration\">0 ms</td>", "<td class=\"col-links\"></td>"], "log": "monkeypatch = &lt;_pytest.monkeypatch.MonkeyPatch object at 0x7f6f74aa6040&gt;\n\n def test_permission_error(monkeypatch):\n # Patch open to raise PermissionError simulating access denial\n def raise_perm_error(*args, **kwargs):\n raise PermissionError(&quot;Permission denied&quot;)\n monkeypatch.setattr(&quot;builtins.open&quot;, raise_perm_error)\n&gt; read_file(&quot;anyfile.txt&quot;)\n\ntests/test_io_utils.py:36: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \nfunctions/io_utils.py:2: in read_file\n with open(path, &quot;r&quot;, encoding=&quot;utf-8&quot;) as f:\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nargs = (&#x27;anyfile.txt&#x27;, &#x27;r&#x27;), kwargs = {&#x27;encoding&#x27;: &#x27;utf-8&#x27;}\n\n def raise_perm_error(*args, **kwargs):\n&gt; raise PermissionError(&quot;Permission denied&quot;)\nE PermissionError: Permission denied\n\ntests/test_io_utils.py:34: PermissionError\n"}], "tests/test_io_utils.py::test_mock_open_error": [{"extras": [], "result": "Failed", "testId": "tests/test_io_utils.py::test_mock_open_error", "duration": "3 ms", "resultsTableRow": ["<td class=\"col-result\">Failed</td>", "<td class=\"col-testId\">tests/test_io_utils.py::test_mock_open_error</td>", "<td class=\"col-duration\">3 ms</td>", "<td class=\"col-links\"></td>"], "log": "monkeypatch = &lt;_pytest.monkeypatch.MonkeyPatch object at 0x7f6f74c95280&gt;\n\n def test_mock_open_error(monkeypatch):\n # Mock open() to raise IOError simulating read error\n mocked_open = mock.mock_open()\n mocked_open.side_effect = IOError(&quot;Mocked IOError&quot;)\n monkeypatch.setattr(&quot;builtins.open&quot;, mocked_open)\n&gt; with open(&quot;file.txt&quot;, &quot;r&quot;) as f:\n\ntests/test_io_utils.py:43: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n.pixi/envs/default/lib/python3.8/unittest/mock.py:1081: in __call__\n return self._mock_call(*args, **kwargs)\n.pixi/envs/default/lib/python3.8/unittest/mock.py:1085: in _mock_call\n return self._execute_mock_call(*args, **kwargs)\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = &lt;MagicMock name=&#x27;open&#x27; spec=&#x27;builtin_function_or_method&#x27; id=&#x27;140116677448752&#x27;&gt;\nargs = (&#x27;file.txt&#x27;, &#x27;r&#x27;), kwargs = {}, effect = OSError(&#x27;Mocked IOError&#x27;)\n\n def _execute_mock_call(self, /, *args, **kwargs):\n # separate from _increment_mock_call so that awaited functions are\n # executed separately from their call, also AsyncMock overrides this method\n \n effect = self.side_effect\n if effect is not None:\n if _is_exception(effect):\n&gt; raise effect\nE OSError: Mocked IOError\n\n.pixi/envs/default/lib/python3.8/unittest/mock.py:1140: OSError\n"}], "tests/test_io_utils.py::test_file_handle_closed_error": [{"extras": [], "result": "Failed", "testId": "tests/test_io_utils.py::test_file_handle_closed_error", "duration": "0 ms", "resultsTableRow": ["<td class=\"col-result\">Failed</td>", "<td class=\"col-testId\">tests/test_io_utils.py::test_file_handle_closed_error</td>", "<td class=\"col-duration\">0 ms</td>", "<td class=\"col-links\"></td>"], "log": "def test_file_handle_closed_error():\n # Accessing closed file raises ValueError\n f = io.StringIO(&quot;content&quot;)\n f.close()\n&gt; f.read()\nE ValueError: I/O operation on closed file\n\ntests/test_io_utils.py:50: ValueError\n"}], "tests/test_io_utils.py::test_os_error": [{"extras": [], "result": "Failed", "testId": "tests/test_io_utils.py::test_os_error", "duration": "0 ms", "resultsTableRow": ["<td class=\"col-result\">Failed</td>", "<td class=\"col-testId\">tests/test_io_utils.py::test_os_error</td>", "<td class=\"col-duration\">0 ms</td>", "<td class=\"col-links\"></td>"], "log": "monkeypatch = &lt;_pytest.monkeypatch.MonkeyPatch object at 0x7f6f74ce8100&gt;\n\n def test_os_error(monkeypatch):\n # Patch os.remove to raise OSError simulating filesystem error\n def raise_os_error(path):\n raise OSError(&quot;Simulated OSError&quot;)\n monkeypatch.setattr(&quot;os.remove&quot;, raise_os_error)\n&gt; os.remove(&quot;file.txt&quot;)\n\ntests/test_io_utils.py:57: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\npath = &#x27;file.txt&#x27;\n\n def raise_os_error(path):\n&gt; raise OSError(&quot;Simulated OSError&quot;)\nE OSError: Simulated OSError\n\ntests/test_io_utils.py:55: OSError\n"}], "tests/test_io_utils.py::test_write_file_readonly": [{"extras": [], "result": "Passed", "testId": "tests/test_io_utils.py::test_write_file_readonly", "duration": "2 ms", "resultsTableRow": ["<td class=\"col-result\">Passed</td>", "<td class=\"col-testId\">tests/test_io_utils.py::test_write_file_readonly</td>", "<td class=\"col-duration\">2 ms</td>", "<td class=\"col-links\"></td>"], "log": "No log output captured."}], "tests/test_io_utils.py::test_file_not_found_error": [{"extras": [], "result": "Failed", "testId": "tests/test_io_utils.py::test_file_not_found_error", "duration": "0 ms", "resultsTableRow": ["<td class=\"col-result\">Failed</td>", "<td class=\"col-testId\">tests/test_io_utils.py::test_file_not_found_error</td>", "<td class=\"col-duration\">0 ms</td>", "<td class=\"col-links\"></td>"], "log": "def test_file_not_found_error():\n # Raises FileNotFoundError when opening a non-existent file\n&gt; open(&quot;no_such_file.txt&quot;, &quot;r&quot;)\nE FileNotFoundError: [Errno 2] No such file or directory: &#x27;no_such_file.txt&#x27;\n\ntests/test_io_utils.py:69: FileNotFoundError\n"}], "tests/test_math_utils.py::test_broken": [{"extras": [], "result": "Failed", "testId": "tests/test_math_utils.py::test_broken", "duration": "0 ms", "resultsTableRow": ["<td class=\"col-result\">Failed</td>", "<td class=\"col-testId\">tests/test_math_utils.py::test_broken</td>", "<td class=\"col-duration\">0 ms</td>", "<td class=\"col-links\"></td>"], "log": "def test_broken():\n # simulating a broken or faulty test implementation that will cause the test to error\n&gt; want_the_test_to_fail\nE NameError: name &#x27;want_the_test_to_fail&#x27; is not defined\n\ntests/test_math_utils.py:16: NameError\n"}], "tests/test_math_utils.py::test_call_missing_function": [{"extras": [], "result": "Failed", "testId": "tests/test_math_utils.py::test_call_missing_function", "duration": "0 ms", "resultsTableRow": ["<td class=\"col-result\">Failed</td>", "<td class=\"col-testId\">tests/test_math_utils.py::test_call_missing_function</td>", "<td class=\"col-duration\">0 ms</td>", "<td class=\"col-links\"></td>"], "log": "def test_call_missing_function():\n # Accessing a missing function attribute raises AttributeError\n&gt; getattr(math_utils, &quot;non_existent_function&quot;)()\nE AttributeError: module &#x27;functions.math_utils&#x27; has no attribute &#x27;non_existent_function&#x27;\n\ntests/test_math_utils.py:20: AttributeError\n"}], "tests/test_math_utils.py::test_addition_pass[2-2-4]": [{"extras": [], "result": "Passed", "testId": "tests/test_math_utils.py::test_addition_pass[2-2-4]", "duration": "0 ms", "resultsTableRow": ["<td class=\"col-result\">Passed</td>", "<td class=\"col-testId\">tests/test_math_utils.py::test_addition_pass[2-2-4]</td>", "<td class=\"col-duration\">0 ms</td>", "<td class=\"col-links\"></td>"], "log": "No log output captured."}], "tests/test_math_utils.py::test_addition_pass[1-5-6]": [{"extras": [], "result": "Passed", "testId": "tests/test_math_utils.py::test_addition_pass[1-5-6]", "duration": "0 ms", "resultsTableRow": ["<td class=\"col-result\">Passed</td>", "<td class=\"col-testId\">tests/test_math_utils.py::test_addition_pass[1-5-6]</td>", "<td class=\"col-duration\">0 ms</td>", "<td class=\"col-links\"></td>"], "log": "No log output captured."}], "tests/test_math_utils.py::test_addition_pass[3-4-7]": [{"extras": [], "result": "Passed", "testId": "tests/test_math_utils.py::test_addition_pass[3-4-7]", "duration": "0 ms", "resultsTableRow": ["<td class=\"col-result\">Passed</td>", "<td class=\"col-testId\">tests/test_math_utils.py::test_addition_pass[3-4-7]</td>", "<td class=\"col-duration\">0 ms</td>", "<td class=\"col-links\"></td>"], "log": "No log output captured."}], "tests/test_math_utils.py::test_addition_pass[3-5-8]": [{"extras": [], "result": "Passed", "testId": "tests/test_math_utils.py::test_addition_pass[3-5-8]", "duration": "0 ms", "resultsTableRow": ["<td class=\"col-result\">Passed</td>", "<td class=\"col-testId\">tests/test_math_utils.py::test_addition_pass[3-5-8]</td>", "<td class=\"col-duration\">0 ms</td>", "<td class=\"col-links\"></td>"], "log": "No log output captured."}], "tests/test_math_utils.py::test_addition_pass[3-6-9]": [{"extras": [], "result": "Passed", "testId": "tests/test_math_utils.py::test_addition_pass[3-6-9]", "duration": "0 ms", "resultsTableRow": ["<td class=\"col-result\">Passed</td>", "<td class=\"col-testId\">tests/test_math_utils.py::test_addition_pass[3-6-9]</td>", "<td class=\"col-duration\">0 ms</td>", "<td class=\"col-links\"></td>"], "log": "No log output captured."}], "tests/test_math_utils.py::test_addition_pass_id[a=2,b=2,expected=4]": [{"extras": [], "result": "Passed", "testId": "tests/test_math_utils.py::test_addition_pass_id[a=2,b=2,expected=4]", "duration": "0 ms", "resultsTableRow": ["<td class=\"col-result\">Passed</td>", "<td class=\"col-testId\">tests/test_math_utils.py::test_addition_pass_id[a=2,b=2,expected=4]</td>", "<td class=\"col-duration\">0 ms</td>", "<td class=\"col-links\"></td>"], "log": "No log output captured."}], "tests/test_math_utils.py::test_addition_pass_id[a=1,b=5,expected=6]": [{"extras": [], "result": "Passed", "testId": "tests/test_math_utils.py::test_addition_pass_id[a=1,b=5,expected=6]", "duration": "0 ms", "resultsTableRow": ["<td class=\"col-result\">Passed</td>", "<td class=\"col-testId\">tests/test_math_utils.py::test_addition_pass_id[a=1,b=5,expected=6]</td>", "<td class=\"col-duration\">0 ms</td>", "<td class=\"col-links\"></td>"], "log": "No log output captured."}], "tests/test_math_utils.py::test_addition_pass_id[a=3,b=4,expected=7]": [{"extras": [], "result": "Passed", "testId": "tests/test_math_utils.py::test_addition_pass_id[a=3,b=4,expected=7]", "duration": "0 ms", "resultsTableRow": ["<td class=\"col-result\">Passed</td>", "<td class=\"col-testId\">tests/test_math_utils.py::test_addition_pass_id[a=3,b=4,expected=7]</td>", "<td class=\"col-duration\">0 ms</td>", "<td class=\"col-links\"></td>"], "log": "No log output captured."}], "tests/test_math_utils.py::test_addition_fail": [{"extras": [], "result": "Failed", "testId": "tests/test_math_utils.py::test_addition_fail", "duration": "0 ms", "resultsTableRow": ["<td class=\"col-result\">Failed</td>", "<td class=\"col-testId\">tests/test_math_utils.py::test_addition_fail</td>", "<td class=\"col-duration\">0 ms</td>", "<td class=\"col-links\"></td>"], "log": "def test_addition_fail():\n # Assertion failure: expected incorrect result\n&gt; assert addition(2, 2) == 5\nE assert 4 == 5\nE + where 4 = addition(2, 2)\n\ntests/test_math_utils.py:48: AssertionError\n"}], "tests/test_math_utils.py::test_division_zero": [{"extras": [], "result": "Failed", "testId": "tests/test_math_utils.py::test_division_zero", "duration": "0 ms", "resultsTableRow": ["<td class=\"col-result\">Failed</td>", "<td class=\"col-testId\">tests/test_math_utils.py::test_division_zero</td>", "<td class=\"col-duration\">0 ms</td>", "<td class=\"col-links\"></td>"], "log": "def test_division_zero():\n # Will raise ZeroDivisionError if not handled in division\n&gt; division(1, 0)\n\ntests/test_math_utils.py:52: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\na = 1, b = 0\n\n def division(a, b):\n&gt; return a / b\nE ZeroDivisionError: division by zero\n\nfunctions/math_utils.py:5: ZeroDivisionError\n"}], "tests/test_math_utils.py::test_multiply_xfail": [{"extras": [], "result": "XFailed", "testId": "tests/test_math_utils.py::test_multiply_xfail", "duration": "0 ms", "resultsTableRow": ["<td class=\"col-result\">XFailed</td>", "<td class=\"col-testId\">tests/test_math_utils.py::test_multiply_xfail</td>", "<td class=\"col-duration\">0 ms</td>", "<td class=\"col-links\"></td>"], "log": "@pytest.mark.xfail(reason=&quot;Expected failure&quot;)\n def test_multiply_xfail():\n # Expected fail test (xfail): incorrect expected multiply result\n&gt; assert multiply(2, 2) == 5\nE assert 4 == 5\nE + where 4 = multiply(2, 2)\n\ntests/test_math_utils.py:57: AssertionError\n"}], "tests/test_math_utils.py::test_runtime_error": [{"extras": [], "result": "Failed", "testId": "tests/test_math_utils.py::test_runtime_error", "duration": "0 ms", "resultsTableRow": ["<td class=\"col-result\">Failed</td>", "<td class=\"col-testId\">tests/test_math_utils.py::test_runtime_error</td>", "<td class=\"col-duration\">0 ms</td>", "<td class=\"col-links\"></td>"], "log": "def test_runtime_error():\n # Test raises an uncaught RuntimeError\n&gt; raise RuntimeError(&quot;Forced runtime error&quot;)\nE RuntimeError: Forced runtime error\n\ntests/test_math_utils.py:61: RuntimeError\n"}], "tests/test_math_utils.py::test_memory_error": [{"extras": [], "result": "Failed", "testId": "tests/test_math_utils.py::test_memory_error", "duration": "0 ms", "resultsTableRow": ["<td class=\"col-result\">Failed</td>", "<td class=\"col-testId\">tests/test_math_utils.py::test_memory_error</td>", "<td class=\"col-duration\">0 ms</td>", "<td class=\"col-links\"></td>"], "log": "def test_memory_error():\n # Manually raise MemoryError to simulate out-of-memory condition\n&gt; raise MemoryError(&quot;Simulated memory error&quot;)\nE MemoryError: Simulated memory error\n\ntests/test_math_utils.py:65: MemoryError\n"}], "tests/test_math_utils.py::test_timeout_error": [{"extras": [], "result": "Failed", "testId": "tests/test_math_utils.py::test_timeout_error", "duration": "0 ms", "resultsTableRow": ["<td class=\"col-result\">Failed</td>", "<td class=\"col-testId\">tests/test_math_utils.py::test_timeout_error</td>", "<td class=\"col-duration\">0 ms</td>", "<td class=\"col-links\"></td>"], "log": "def test_timeout_error():\n # Manually raise TimeoutError simulating timeout conditions\n&gt; raise TimeoutError(&quot;Simulated timeout error&quot;)\nE TimeoutError: Simulated timeout error\n\ntests/test_math_utils.py:69: TimeoutError\n"}], "tests/test_math_utils.py::test_recursion_error": [{"extras": [], "result": "Failed", "testId": "tests/test_math_utils.py::test_recursion_error", "duration": "1 ms", "resultsTableRow": ["<td class=\"col-result\">Failed</td>", "<td class=\"col-testId\">tests/test_math_utils.py::test_recursion_error</td>", "<td class=\"col-duration\">1 ms</td>", "<td class=\"col-links\"></td>"], "log": "def test_recursion_error():\n # Infinite recursion triggers RecursionError\n def recursive():\n return recursive()\n&gt; recursive()\n\ntests/test_math_utils.py:75: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \ntests/test_math_utils.py:74: in recursive\n return recursive()\ntests/test_math_utils.py:74: in recursive\n return recursive()\nE RecursionError: maximum recursion depth exceeded\n!!! Recursion detected (same locals &amp; position)\n"}], "tests/test_math_utils.py::test_floating_point_error": [{"extras": [], "result": "Failed", "testId": "tests/test_math_utils.py::test_floating_point_error", "duration": "0 ms", "resultsTableRow": ["<td class=\"col-result\">Failed</td>", "<td class=\"col-testId\">tests/test_math_utils.py::test_floating_point_error</td>", "<td class=\"col-duration\">0 ms</td>", "<td class=\"col-links\"></td>"], "log": "def test_floating_point_error():\n # Manually raise FloatingPointError (rare in practice)\n&gt; raise FloatingPointError(&quot;Simulated floating point error&quot;)\nE FloatingPointError: Simulated floating point error\n\ntests/test_math_utils.py:79: FloatingPointError\n"}], "tests/test_math_utils.py::test_floating_point_overflow": [{"extras": [], "result": "Failed", "testId": "tests/test_math_utils.py::test_floating_point_overflow", "duration": "0 ms", "resultsTableRow": ["<td class=\"col-result\">Failed</td>", "<td class=\"col-testId\">tests/test_math_utils.py::test_floating_point_overflow</td>", "<td class=\"col-duration\">0 ms</td>", "<td class=\"col-links\"></td>"], "log": "def test_floating_point_overflow():\n # Exponential overflow triggers OverflowError\n&gt; math.exp(1000)\nE OverflowError: math range error\n\ntests/test_math_utils.py:83: OverflowError\n"}], "tests/test_math_utils.py::test_value_error": [{"extras": [], "result": "Failed", "testId": "tests/test_math_utils.py::test_value_error", "duration": "0 ms", "resultsTableRow": ["<td class=\"col-result\">Failed</td>", "<td class=\"col-testId\">tests/test_math_utils.py::test_value_error</td>", "<td class=\"col-duration\">0 ms</td>", "<td class=\"col-links\"></td>"], "log": "def test_value_error():\n # ValueError on invalid integer conversion\n&gt; int(&quot;invalid&quot;)\nE ValueError: invalid literal for int() with base 10: &#x27;invalid&#x27;\n\ntests/test_math_utils.py:87: ValueError\n"}], "tests/test_math_utils.py::test_type_error": [{"extras": [], "result": "Failed", "testId": "tests/test_math_utils.py::test_type_error", "duration": "0 ms", "resultsTableRow": ["<td class=\"col-result\">Failed</td>", "<td class=\"col-testId\">tests/test_math_utils.py::test_type_error</td>", "<td class=\"col-duration\">0 ms</td>", "<td class=\"col-links\"></td>"], "log": "def test_type_error():\n # TypeError when passing wrong argument type to sum\n&gt; sum(5)\nE TypeError: &#x27;int&#x27; object is not iterable\n\ntests/test_math_utils.py:91: TypeError\n"}], "tests/test_math_utils.py::test_unhandled_exception": [{"extras": [], "result": "Failed", "testId": "tests/test_math_utils.py::test_unhandled_exception", "duration": "0 ms", "resultsTableRow": ["<td class=\"col-result\">Failed</td>", "<td class=\"col-testId\">tests/test_math_utils.py::test_unhandled_exception</td>", "<td class=\"col-duration\">0 ms</td>", "<td class=\"col-links\"></td>"], "log": "def test_unhandled_exception():\n # Raises generic unhandled Exception\n&gt; raise Exception(&quot;Generic unhandled exception&quot;)\nE Exception: Generic unhandled exception\n\ntests/test_math_utils.py:95: Exception\n"}], "tests/test_math_utils.py::test_custom_error": [{"extras": [], "result": "Failed", "testId": "tests/test_math_utils.py::test_custom_error", "duration": "0 ms", "resultsTableRow": ["<td class=\"col-result\">Failed</td>", "<td class=\"col-testId\">tests/test_math_utils.py::test_custom_error</td>", "<td class=\"col-duration\">0 ms</td>", "<td class=\"col-links\"></td>"], "log": "def test_custom_error():\n # Raises user-defined CustomError exception\n&gt; raise CustomError(&quot;Custom error simulation&quot;)\nE test_math_utils.CustomError: Custom error simulation\n\ntests/test_math_utils.py:99: CustomError\n"}], "tests/test_math_utils.py::test_stop_iteration_direct": [{"extras": [], "result": "Failed", "testId": "tests/test_math_utils.py::test_stop_iteration_direct", "duration": "0 ms", "resultsTableRow": ["<td class=\"col-result\">Failed</td>", "<td class=\"col-testId\">tests/test_math_utils.py::test_stop_iteration_direct</td>", "<td class=\"col-duration\">0 ms</td>", "<td class=\"col-links\"></td>"], "log": "def test_stop_iteration_direct():\n # Directly raise StopIteration exception\n&gt; raise StopIteration()\nE StopIteration\n\ntests/test_math_utils.py:103: StopIteration\n\nThe above exception was the direct cause of the following exception:\n\ncls = &lt;class &#x27;_pytest.runner.CallInfo&#x27;&gt;\nfunc = &lt;function call_and_report.&lt;locals&gt;.&lt;lambda&gt; at 0x7f6f74900550&gt;\nwhen = &#x27;call&#x27;\nreraise = (&lt;class &#x27;_pytest.outcomes.Exit&#x27;&gt;, &lt;class &#x27;KeyboardInterrupt&#x27;&gt;)\n\n @classmethod\n def from_call(\n cls,\n func: Callable[[], TResult],\n when: Literal[&quot;collect&quot;, &quot;setup&quot;, &quot;call&quot;, &quot;teardown&quot;],\n reraise: type[BaseException] | tuple[type[BaseException], ...] | None = None,\n ) -&gt; CallInfo[TResult]:\n &quot;&quot;&quot;Call func, wrapping the result in a CallInfo.\n \n :param func:\n The function to call. Called without arguments.\n :type func: Callable[[], _pytest.runner.TResult]\n :param when:\n The phase in which the function is called.\n :param reraise:\n Exception or exceptions that shall propagate if raised by the\n function, instead of being wrapped in the CallInfo.\n &quot;&quot;&quot;\n excinfo = None\n start = timing.time()\n precise_start = timing.perf_counter()\n try:\n&gt; result: TResult | None = func()\n\n.pixi/envs/default/lib/python3.8/site-packages/_pytest/runner.py:341: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n.pixi/envs/default/lib/python3.8/site-packages/_pytest/runner.py:242: in &lt;lambda&gt;\n lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise\n.pixi/envs/default/lib/python3.8/site-packages/pluggy/_hooks.py:513: in __call__\n return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)\n.pixi/envs/default/lib/python3.8/site-packages/pluggy/_manager.py:120: in _hookexec\n return self._inner_hookexec(hook_name, methods, kwargs, firstresult)\n.pixi/envs/default/lib/python3.8/site-packages/_pytest/threadexception.py:92: in pytest_runtest_call\n yield from thread_exception_runtest_hook()\n.pixi/envs/default/lib/python3.8/site-packages/_pytest/threadexception.py:68: in thread_exception_runtest_hook\n yield\n.pixi/envs/default/lib/python3.8/site-packages/_pytest/unraisableexception.py:95: in pytest_runtest_call\n yield from unraisable_exception_runtest_hook()\n.pixi/envs/default/lib/python3.8/site-packages/_pytest/unraisableexception.py:70: in unraisable_exception_runtest_hook\n yield\n.pixi/envs/default/lib/python3.8/site-packages/_pytest/logging.py:846: in pytest_runtest_call\n yield from self._runtest_for(item, &quot;call&quot;)\n.pixi/envs/default/lib/python3.8/site-packages/_pytest/logging.py:829: in _runtest_for\n yield\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = &lt;CaptureManager _method=&#x27;no&#x27; _global_capturing=&lt;MultiCapture out=None err=None in_=None _state=&#x27;suspended&#x27; _in_suspended=False&gt; _capture_fixture=None&gt;\nitem = &lt;Function test_stop_iteration_direct&gt;\n\n @hookimpl(wrapper=True)\n def pytest_runtest_call(self, item: Item) -&gt; Generator[None]:\n with self.item_capture(&quot;call&quot;, item):\n&gt; return (yield)\nE RuntimeError: generator raised StopIteration\n\n.pixi/envs/default/lib/python3.8/site-packages/_pytest/capture.py:880: RuntimeError\n"}], "tests/test_math_utils.py::test_generator_exit_direct": [{"extras": [], "result": "Failed", "testId": "tests/test_math_utils.py::test_generator_exit_direct", "duration": "0 ms", "resultsTableRow": ["<td class=\"col-result\">Failed</td>", "<td class=\"col-testId\">tests/test_math_utils.py::test_generator_exit_direct</td>", "<td class=\"col-duration\">0 ms</td>", "<td class=\"col-links\"></td>"], "log": "def test_generator_exit_direct():\n # Directly raise GeneratorExit exception\n&gt; raise GeneratorExit()\nE GeneratorExit\n\ntests/test_math_utils.py:107: GeneratorExit\n"}], "tests/test_math_utils.py::test_recursion_limit": [{"extras": [], "result": "Failed", "testId": "tests/test_math_utils.py::test_recursion_limit", "duration": "0 ms", "resultsTableRow": ["<td class=\"col-result\">Failed</td>", "<td class=\"col-testId\">tests/test_math_utils.py::test_recursion_limit</td>", "<td class=\"col-duration\">0 ms</td>", "<td class=\"col-links\"></td>"], "log": "def test_recursion_limit():\n # Lower recursion limit to force RecursionError on deep recursion\n original_limit = sys.getrecursionlimit()\n&gt; sys.setrecursionlimit(50)\nE RecursionError: cannot set the recursion limit to 50 at the recursion depth 37: the limit is too low\n\ntests/test_math_utils.py:112: RecursionError\n"}], "tests/test_math_utils.py::test_malformed_code": [{"extras": [], "result": "Failed", "testId": "tests/test_math_utils.py::test_malformed_code", "duration": "0 ms", "resultsTableRow": ["<td class=\"col-result\">Failed</td>", "<td class=\"col-testId\">tests/test_math_utils.py::test_malformed_code</td>", "<td class=\"col-duration\">0 ms</td>", "<td class=\"col-links\"></td>"], "log": "def test_malformed_code():\n # SyntaxError when executing malformed Python code\n&gt; exec(&quot;def bad(:\\n pass&quot;)\nE File &quot;&lt;string&gt;&quot;, line 1\nE def bad(:\nE ^\nE SyntaxError: invalid syntax\n\ntests/test_math_utils.py:122: SyntaxError\n"}], "tests/test_math_utils.py::test_sys_exit": [{"extras": [], "result": "Failed", "testId": "tests/test_math_utils.py::test_sys_exit", "duration": "0 ms", "resultsTableRow": ["<td class=\"col-result\">Failed</td>", "<td class=\"col-testId\">tests/test_math_utils.py::test_sys_exit</td>", "<td class=\"col-duration\">0 ms</td>", "<td class=\"col-links\"></td>"], "log": "def test_sys_exit():\n # Simulate SystemExit via sys.exit\n&gt; sys.exit(1)\nE SystemExit: 1\n\ntests/test_math_utils.py:126: SystemExit\n"}], "tests/test_math_utils.py::test_broken_function": [{"extras": [], "result": "Failed", "testId": "tests/test_math_utils.py::test_broken_function", "duration": "0 ms", "resultsTableRow": ["<td class=\"col-result\">Failed</td>", "<td class=\"col-testId\">tests/test_math_utils.py::test_broken_function</td>", "<td class=\"col-duration\">0 ms</td>", "<td class=\"col-links\"></td>"], "log": "def test_broken_function():\n # Simulate broken function raising TypeError\n def broken_func(*args, **kwargs):\n raise TypeError(&quot;Broken function&quot;)\n&gt; broken_func()\n\ntests/test_math_utils.py:132: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nargs = (), kwargs = {}\n\n def broken_func(*args, **kwargs):\n&gt; raise TypeError(&quot;Broken function&quot;)\nE TypeError: Broken function\n\ntests/test_math_utils.py:131: TypeError\n"}], "tests/test_math_utils.py::test_import_error_patch": [{"extras": [], "result": "Failed", "testId": "tests/test_math_utils.py::test_import_error_patch", "duration": "0 ms", "resultsTableRow": ["<td class=\"col-result\">Failed</td>", "<td class=\"col-testId\">tests/test_math_utils.py::test_import_error_patch</td>", "<td class=\"col-duration\">0 ms</td>", "<td class=\"col-links\"></td>"], "log": "def test_import_error_patch():\n # Patch import to simulate ImportError on specific module\n original_import = __import__\n def fake_import(name, *args, **kwargs):\n if name == &quot;fake_module&quot;:\n raise ImportError(&quot;Simulated ImportError&quot;)\n return original_import(name, *args, **kwargs)\n import builtins\n builtins.__import__, old_import = fake_import, builtins.__import__\n try:\n&gt; __import__(&quot;fake_module&quot;)\n\ntests/test_math_utils.py:144: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nname = &#x27;fake_module&#x27;, args = (), kwargs = {}\n\n def fake_import(name, *args, **kwargs):\n if name == &quot;fake_module&quot;:\n&gt; raise ImportError(&quot;Simulated ImportError&quot;)\nE ImportError: Simulated ImportError\n\ntests/test_math_utils.py:139: ImportError\n"}], "tests/test_math_utils.py::test_module_not_found_error": [{"extras": [], "result": "Failed", "testId": "tests/test_math_utils.py::test_module_not_found_error", "duration": "1 ms", "resultsTableRow": ["<td class=\"col-result\">Failed</td>", "<td class=\"col-testId\">tests/test_math_utils.py::test_module_not_found_error</td>", "<td class=\"col-duration\">1 ms</td>", "<td class=\"col-links\"></td>"], "log": "def test_module_not_found_error():\n # Raises ModuleNotFoundError (subclass of ImportError) for missing module\n&gt; importlib.import_module(&quot;non_existent_module_xyz&quot;)\n\ntests/test_math_utils.py:150: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n.pixi/envs/default/lib/python3.8/importlib/__init__.py:127: in import_module\n return _bootstrap._gcd_import(name[level:], package, level)\n&lt;frozen importlib._bootstrap&gt;:1014: in _gcd_import\n ???\n&lt;frozen importlib._bootstrap&gt;:991: in _find_and_load\n ???\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nname = &#x27;non_existent_module_xyz&#x27;\nimport_ = &lt;function _gcd_import at 0x7f6f793954c0&gt;\n\n&gt; ???\nE ModuleNotFoundError: No module named &#x27;non_existent_module_xyz&#x27;\n\n&lt;frozen importlib._bootstrap&gt;:973: ModuleNotFoundError\n"}], "tests/test_string_utils.py::test_uppercase_normal": [{"extras": [], "result": "Passed", "testId": "tests/test_string_utils.py::test_uppercase_normal", "duration": "0 ms", "resultsTableRow": ["<td class=\"col-result\">Passed</td>", "<td class=\"col-testId\">tests/test_string_utils.py::test_uppercase_normal</td>", "<td class=\"col-duration\">0 ms</td>", "<td class=\"col-links\"></td>"], "log": "No log output captured."}], "tests/test_string_utils.py::test_uppercase_type_error": [{"extras": [], "result": "Failed", "testId": "tests/test_string_utils.py::test_uppercase_type_error", "duration": "0 ms", "resultsTableRow": ["<td class=\"col-result\">Failed</td>", "<td class=\"col-testId\">tests/test_string_utils.py::test_uppercase_type_error</td>", "<td class=\"col-duration\">0 ms</td>", "<td class=\"col-links\"></td>"], "log": "def test_uppercase_type_error():\n # TypeError when input is None (invalid input)\n&gt; uppercase(None)\n\ntests/test_string_utils.py:14: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\ns = None\n\n def uppercase(s):\n if s is None:\n&gt; raise TypeError(&quot;Input cannot be None&quot;)\nE TypeError: Input cannot be None\n\nfunctions/string_utils.py:3: TypeError\n"}], "tests/test_string_utils.py::test_reverse_string": [{"extras": [], "result": "Passed", "testId": "tests/test_string_utils.py::test_reverse_string", "duration": "0 ms", "resultsTableRow": ["<td class=\"col-result\">Passed</td>", "<td class=\"col-testId\">tests/test_string_utils.py::test_reverse_string</td>", "<td class=\"col-duration\">0 ms</td>", "<td class=\"col-links\"></td>"], "log": "No log output captured."}], "tests/test_string_utils.py::test_warning_emit": [{"extras": [], "result": "Passed", "testId": "tests/test_string_utils.py::test_warning_emit", "duration": "0 ms", "resultsTableRow": ["<td class=\"col-result\">Passed</td>", "<td class=\"col-testId\">tests/test_string_utils.py::test_warning_emit</td>", "<td class=\"col-duration\">0 ms</td>", "<td class=\"col-links\"></td>"], "log": "No log output captured."}], "tests/test_string_utils.py::test_unicode_decode_error": [{"extras": [], "result": "Failed", "testId": "tests/test_string_utils.py::test_unicode_decode_error", "duration": "0 ms", "resultsTableRow": ["<td class=\"col-result\">Failed</td>", "<td class=\"col-testId\">tests/test_string_utils.py::test_unicode_decode_error</td>", "<td class=\"col-duration\">0 ms</td>", "<td class=\"col-links\"></td>"], "log": "def test_unicode_decode_error():\n # UnicodeDecodeError when decoding invalid byte sequence\n&gt; b&#x27;\\xff&#x27;.decode(&#x27;utf-8&#x27;)\nE UnicodeDecodeError: &#x27;utf-8&#x27; codec can&#x27;t decode byte 0xff in position 0: invalid start byte\n\ntests/test_string_utils.py:26: UnicodeDecodeError\n"}], "tests/test_string_utils.py::test_unicode_decode_surrogateescape": [{"extras": [], "result": "Failed", "testId": "tests/test_string_utils.py::test_unicode_decode_surrogateescape", "duration": "0 ms", "resultsTableRow": ["<td class=\"col-result\">Failed</td>", "<td class=\"col-testId\">tests/test_string_utils.py::test_unicode_decode_surrogateescape</td>", "<td class=\"col-duration\">0 ms</td>", "<td class=\"col-links\"></td>"], "log": "def test_unicode_decode_surrogateescape():\n # UnicodeDecodeError with strict error handler on invalid byte\n&gt; b&quot;\\x80&quot;.decode(&quot;utf-8&quot;, errors=&quot;strict&quot;)\nE UnicodeDecodeError: &#x27;utf-8&#x27; codec can&#x27;t decode byte 0x80 in position 0: invalid start byte\n\ntests/test_string_utils.py:30: UnicodeDecodeError\n"}], "tests/test_string_utils.py::test_import_warning": [{"extras": [], "result": "Passed", "testId": "tests/test_string_utils.py::test_import_warning", "duration": "0 ms", "resultsTableRow": ["<td class=\"col-result\">Passed</td>", "<td class=\"col-testId\">tests/test_string_utils.py::test_import_warning</td>", "<td class=\"col-duration\">0 ms</td>", "<td class=\"col-links\"></td>"], "log": "No log output captured."}], "tests/test_string_utils.py::test_xfail_uppercase_digits": [{"extras": [], "result": "XFailed", "testId": "tests/test_string_utils.py::test_xfail_uppercase_digits", "duration": "0 ms", "resultsTableRow": ["<td class=\"col-result\">XFailed</td>", "<td class=\"col-testId\">tests/test_string_utils.py::test_xfail_uppercase_digits</td>", "<td class=\"col-duration\">0 ms</td>", "<td class=\"col-links\"></td>"], "log": "@pytest.mark.xfail(reason=&quot;Expected failure: uppercase does not handle digits&quot;)\n def test_xfail_uppercase_digits():\n # Expected fail test because uppercase won&#x27;t change digits\n&gt; assert uppercase(&quot;abc123&quot;) == &quot;ABC1234&quot;\nE AssertionError: assert &#x27;ABC123&#x27; == &#x27;ABC1234&#x27;\nE \nE - ABC1234\nE ? -\nE + ABC123\n\ntests/test_string_utils.py:39: AssertionError\n"}]}, "renderCollapsed": ["passed"], "initialSort": "result", "title": "pytest-report.html"}"></div>
|
|
<script>
|
|
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
|
|
const { getCollapsedCategory, setCollapsedIds } = require('./storage.js')
|
|
|
|
class DataManager {
|
|
setManager(data) {
|
|
const collapsedCategories = [...getCollapsedCategory(data.renderCollapsed)]
|
|
const collapsedIds = []
|
|
const tests = Object.values(data.tests).flat().map((test, index) => {
|
|
const collapsed = collapsedCategories.includes(test.result.toLowerCase())
|
|
const id = `test_${index}`
|
|
if (collapsed) {
|
|
collapsedIds.push(id)
|
|
}
|
|
return {
|
|
...test,
|
|
id,
|
|
collapsed,
|
|
}
|
|
})
|
|
const dataBlob = { ...data, tests }
|
|
this.data = { ...dataBlob }
|
|
this.renderData = { ...dataBlob }
|
|
setCollapsedIds(collapsedIds)
|
|
}
|
|
|
|
get allData() {
|
|
return { ...this.data }
|
|
}
|
|
|
|
resetRender() {
|
|
this.renderData = { ...this.data }
|
|
}
|
|
|
|
setRender(data) {
|
|
this.renderData.tests = [...data]
|
|
}
|
|
|
|
toggleCollapsedItem(id) {
|
|
this.renderData.tests = this.renderData.tests.map((test) =>
|
|
test.id === id ? { ...test, collapsed: !test.collapsed } : test,
|
|
)
|
|
}
|
|
|
|
set allCollapsed(collapsed) {
|
|
this.renderData = { ...this.renderData, tests: [...this.renderData.tests.map((test) => (
|
|
{ ...test, collapsed }
|
|
))] }
|
|
}
|
|
|
|
get testSubset() {
|
|
return [...this.renderData.tests]
|
|
}
|
|
|
|
get environment() {
|
|
return this.renderData.environment
|
|
}
|
|
|
|
get initialSort() {
|
|
return this.data.initialSort
|
|
}
|
|
}
|
|
|
|
module.exports = {
|
|
manager: new DataManager(),
|
|
}
|
|
|
|
},{"./storage.js":8}],2:[function(require,module,exports){
|
|
const mediaViewer = require('./mediaviewer.js')
|
|
const templateEnvRow = document.getElementById('template_environment_row')
|
|
const templateResult = document.getElementById('template_results-table__tbody')
|
|
|
|
function htmlToElements(html) {
|
|
const temp = document.createElement('template')
|
|
temp.innerHTML = html
|
|
return temp.content.childNodes
|
|
}
|
|
|
|
const find = (selector, elem) => {
|
|
if (!elem) {
|
|
elem = document
|
|
}
|
|
return elem.querySelector(selector)
|
|
}
|
|
|
|
const findAll = (selector, elem) => {
|
|
if (!elem) {
|
|
elem = document
|
|
}
|
|
return [...elem.querySelectorAll(selector)]
|
|
}
|
|
|
|
const dom = {
|
|
getStaticRow: (key, value) => {
|
|
const envRow = templateEnvRow.content.cloneNode(true)
|
|
const isObj = typeof value === 'object' && value !== null
|
|
const values = isObj ? Object.keys(value).map((k) => `${k}: ${value[k]}`) : null
|
|
|
|
const valuesElement = htmlToElements(
|
|
values ? `<ul>${values.map((val) => `<li>${val}</li>`).join('')}<ul>` : `<div>${value}</div>`)[0]
|
|
const td = findAll('td', envRow)
|
|
td[0].textContent = key
|
|
td[1].appendChild(valuesElement)
|
|
|
|
return envRow
|
|
},
|
|
getResultTBody: ({ testId, id, log, extras, resultsTableRow, tableHtml, result, collapsed }) => {
|
|
const resultBody = templateResult.content.cloneNode(true)
|
|
resultBody.querySelector('tbody').classList.add(result.toLowerCase())
|
|
resultBody.querySelector('tbody').id = testId
|
|
resultBody.querySelector('.collapsible').dataset.id = id
|
|
|
|
resultsTableRow.forEach((html) => {
|
|
const t = document.createElement('template')
|
|
t.innerHTML = html
|
|
resultBody.querySelector('.collapsible').appendChild(t.content)
|
|
})
|
|
|
|
if (log) {
|
|
// Wrap lines starting with "E" with span.error to color those lines red
|
|
const wrappedLog = log.replace(/^E.*$/gm, (match) => `<span class="error">${match}</span>`)
|
|
resultBody.querySelector('.log').innerHTML = wrappedLog
|
|
} else {
|
|
resultBody.querySelector('.log').remove()
|
|
}
|
|
|
|
if (collapsed) {
|
|
resultBody.querySelector('.collapsible > td')?.classList.add('collapsed')
|
|
resultBody.querySelector('.extras-row').classList.add('hidden')
|
|
} else {
|
|
resultBody.querySelector('.collapsible > td')?.classList.remove('collapsed')
|
|
}
|
|
|
|
const media = []
|
|
extras?.forEach(({ name, format_type, content }) => {
|
|
if (['image', 'video'].includes(format_type)) {
|
|
media.push({ path: content, name, format_type })
|
|
}
|
|
|
|
if (format_type === 'html') {
|
|
resultBody.querySelector('.extraHTML').insertAdjacentHTML('beforeend', `<div>${content}</div>`)
|
|
}
|
|
})
|
|
mediaViewer.setup(resultBody, media)
|
|
|
|
// Add custom html from the pytest_html_results_table_html hook
|
|
tableHtml?.forEach((item) => {
|
|
resultBody.querySelector('td[class="extra"]').insertAdjacentHTML('beforeend', item)
|
|
})
|
|
|
|
return resultBody
|
|
},
|
|
}
|
|
|
|
module.exports = {
|
|
dom,
|
|
htmlToElements,
|
|
find,
|
|
findAll,
|
|
}
|
|
|
|
},{"./mediaviewer.js":6}],3:[function(require,module,exports){
|
|
const { manager } = require('./datamanager.js')
|
|
const { doSort } = require('./sort.js')
|
|
const storageModule = require('./storage.js')
|
|
|
|
const getFilteredSubSet = (filter) =>
|
|
manager.allData.tests.filter(({ result }) => filter.includes(result.toLowerCase()))
|
|
|
|
const doInitFilter = () => {
|
|
const currentFilter = storageModule.getVisible()
|
|
const filteredSubset = getFilteredSubSet(currentFilter)
|
|
manager.setRender(filteredSubset)
|
|
}
|
|
|
|
const doFilter = (type, show) => {
|
|
if (show) {
|
|
storageModule.showCategory(type)
|
|
} else {
|
|
storageModule.hideCategory(type)
|
|
}
|
|
|
|
const currentFilter = storageModule.getVisible()
|
|
const filteredSubset = getFilteredSubSet(currentFilter)
|
|
manager.setRender(filteredSubset)
|
|
|
|
const sortColumn = storageModule.getSort()
|
|
doSort(sortColumn, true)
|
|
}
|
|
|
|
module.exports = {
|
|
doFilter,
|
|
doInitFilter,
|
|
}
|
|
|
|
},{"./datamanager.js":1,"./sort.js":7,"./storage.js":8}],4:[function(require,module,exports){
|
|
const { redraw, bindEvents, renderStatic } = require('./main.js')
|
|
const { doInitFilter } = require('./filter.js')
|
|
const { doInitSort } = require('./sort.js')
|
|
const { manager } = require('./datamanager.js')
|
|
const data = JSON.parse(document.getElementById('data-container').dataset.jsonblob)
|
|
|
|
function init() {
|
|
manager.setManager(data)
|
|
doInitFilter()
|
|
doInitSort()
|
|
renderStatic()
|
|
redraw()
|
|
bindEvents()
|
|
}
|
|
|
|
init()
|
|
|
|
},{"./datamanager.js":1,"./filter.js":3,"./main.js":5,"./sort.js":7}],5:[function(require,module,exports){
|
|
const { dom, find, findAll } = require('./dom.js')
|
|
const { manager } = require('./datamanager.js')
|
|
const { doSort } = require('./sort.js')
|
|
const { doFilter } = require('./filter.js')
|
|
const {
|
|
getVisible,
|
|
getCollapsedIds,
|
|
setCollapsedIds,
|
|
getSort,
|
|
getSortDirection,
|
|
possibleFilters,
|
|
} = require('./storage.js')
|
|
|
|
const removeChildren = (node) => {
|
|
while (node.firstChild) {
|
|
node.removeChild(node.firstChild)
|
|
}
|
|
}
|
|
|
|
const renderStatic = () => {
|
|
const renderEnvironmentTable = () => {
|
|
const environment = manager.environment
|
|
const rows = Object.keys(environment).map((key) => dom.getStaticRow(key, environment[key]))
|
|
const table = document.getElementById('environment')
|
|
removeChildren(table)
|
|
rows.forEach((row) => table.appendChild(row))
|
|
}
|
|
renderEnvironmentTable()
|
|
}
|
|
|
|
const addItemToggleListener = (elem) => {
|
|
elem.addEventListener('click', ({ target }) => {
|
|
const id = target.parentElement.dataset.id
|
|
manager.toggleCollapsedItem(id)
|
|
|
|
const collapsedIds = getCollapsedIds()
|
|
if (collapsedIds.includes(id)) {
|
|
const updated = collapsedIds.filter((item) => item !== id)
|
|
setCollapsedIds(updated)
|
|
} else {
|
|
collapsedIds.push(id)
|
|
setCollapsedIds(collapsedIds)
|
|
}
|
|
redraw()
|
|
})
|
|
}
|
|
|
|
const renderContent = (tests) => {
|
|
const sortAttr = getSort(manager.initialSort)
|
|
const sortAsc = JSON.parse(getSortDirection())
|
|
const rows = tests.map(dom.getResultTBody)
|
|
const table = document.getElementById('results-table')
|
|
const tableHeader = document.getElementById('results-table-head')
|
|
|
|
const newTable = document.createElement('table')
|
|
newTable.id = 'results-table'
|
|
|
|
// remove all sorting classes and set the relevant
|
|
findAll('.sortable', tableHeader).forEach((elem) => elem.classList.remove('asc', 'desc'))
|
|
tableHeader.querySelector(`.sortable[data-column-type="${sortAttr}"]`)?.classList.add(sortAsc ? 'desc' : 'asc')
|
|
newTable.appendChild(tableHeader)
|
|
|
|
if (!rows.length) {
|
|
const emptyTable = document.getElementById('template_results-table__body--empty').content.cloneNode(true)
|
|
newTable.appendChild(emptyTable)
|
|
} else {
|
|
rows.forEach((row) => {
|
|
if (!!row) {
|
|
findAll('.collapsible td:not(.col-links', row).forEach(addItemToggleListener)
|
|
find('.logexpander', row).addEventListener('click',
|
|
(evt) => evt.target.parentNode.classList.toggle('expanded'),
|
|
)
|
|
newTable.appendChild(row)
|
|
}
|
|
})
|
|
}
|
|
|
|
table.replaceWith(newTable)
|
|
}
|
|
|
|
const renderDerived = () => {
|
|
const currentFilter = getVisible()
|
|
possibleFilters.forEach((result) => {
|
|
const input = document.querySelector(`input[data-test-result="${result}"]`)
|
|
input.checked = currentFilter.includes(result)
|
|
})
|
|
}
|
|
|
|
const bindEvents = () => {
|
|
const filterColumn = (evt) => {
|
|
const { target: element } = evt
|
|
const { testResult } = element.dataset
|
|
|
|
doFilter(testResult, element.checked)
|
|
const collapsedIds = getCollapsedIds()
|
|
const updated = manager.renderData.tests.map((test) => {
|
|
return {
|
|
...test,
|
|
collapsed: collapsedIds.includes(test.id),
|
|
}
|
|
})
|
|
manager.setRender(updated)
|
|
redraw()
|
|
}
|
|
|
|
const header = document.getElementById('environment-header')
|
|
header.addEventListener('click', () => {
|
|
const table = document.getElementById('environment')
|
|
table.classList.toggle('hidden')
|
|
header.classList.toggle('collapsed')
|
|
})
|
|
|
|
findAll('input[name="filter_checkbox"]').forEach((elem) => {
|
|
elem.addEventListener('click', filterColumn)
|
|
})
|
|
|
|
findAll('.sortable').forEach((elem) => {
|
|
elem.addEventListener('click', (evt) => {
|
|
const { target: element } = evt
|
|
const { columnType } = element.dataset
|
|
doSort(columnType)
|
|
redraw()
|
|
})
|
|
})
|
|
|
|
document.getElementById('show_all_details').addEventListener('click', () => {
|
|
manager.allCollapsed = false
|
|
setCollapsedIds([])
|
|
redraw()
|
|
})
|
|
document.getElementById('hide_all_details').addEventListener('click', () => {
|
|
manager.allCollapsed = true
|
|
const allIds = manager.renderData.tests.map((test) => test.id)
|
|
setCollapsedIds(allIds)
|
|
redraw()
|
|
})
|
|
}
|
|
|
|
const redraw = () => {
|
|
const { testSubset } = manager
|
|
|
|
renderContent(testSubset)
|
|
renderDerived()
|
|
}
|
|
|
|
module.exports = {
|
|
redraw,
|
|
bindEvents,
|
|
renderStatic,
|
|
}
|
|
|
|
},{"./datamanager.js":1,"./dom.js":2,"./filter.js":3,"./sort.js":7,"./storage.js":8}],6:[function(require,module,exports){
|
|
class MediaViewer {
|
|
constructor(assets) {
|
|
this.assets = assets
|
|
this.index = 0
|
|
}
|
|
|
|
nextActive() {
|
|
this.index = this.index === this.assets.length - 1 ? 0 : this.index + 1
|
|
return [this.activeFile, this.index]
|
|
}
|
|
|
|
prevActive() {
|
|
this.index = this.index === 0 ? this.assets.length - 1 : this.index -1
|
|
return [this.activeFile, this.index]
|
|
}
|
|
|
|
get currentIndex() {
|
|
return this.index
|
|
}
|
|
|
|
get activeFile() {
|
|
return this.assets[this.index]
|
|
}
|
|
}
|
|
|
|
|
|
const setup = (resultBody, assets) => {
|
|
if (!assets.length) {
|
|
resultBody.querySelector('.media').classList.add('hidden')
|
|
return
|
|
}
|
|
|
|
const mediaViewer = new MediaViewer(assets)
|
|
const container = resultBody.querySelector('.media-container')
|
|
const leftArrow = resultBody.querySelector('.media-container__nav--left')
|
|
const rightArrow = resultBody.querySelector('.media-container__nav--right')
|
|
const mediaName = resultBody.querySelector('.media__name')
|
|
const counter = resultBody.querySelector('.media__counter')
|
|
const imageEl = resultBody.querySelector('img')
|
|
const sourceEl = resultBody.querySelector('source')
|
|
const videoEl = resultBody.querySelector('video')
|
|
|
|
const setImg = (media, index) => {
|
|
if (media?.format_type === 'image') {
|
|
imageEl.src = media.path
|
|
|
|
imageEl.classList.remove('hidden')
|
|
videoEl.classList.add('hidden')
|
|
} else if (media?.format_type === 'video') {
|
|
sourceEl.src = media.path
|
|
|
|
videoEl.classList.remove('hidden')
|
|
imageEl.classList.add('hidden')
|
|
}
|
|
|
|
mediaName.innerText = media?.name
|
|
counter.innerText = `${index + 1} / ${assets.length}`
|
|
}
|
|
setImg(mediaViewer.activeFile, mediaViewer.currentIndex)
|
|
|
|
const moveLeft = () => {
|
|
const [media, index] = mediaViewer.prevActive()
|
|
setImg(media, index)
|
|
}
|
|
const doRight = () => {
|
|
const [media, index] = mediaViewer.nextActive()
|
|
setImg(media, index)
|
|
}
|
|
const openImg = () => {
|
|
window.open(mediaViewer.activeFile.path, '_blank')
|
|
}
|
|
if (assets.length === 1) {
|
|
container.classList.add('media-container--fullscreen')
|
|
} else {
|
|
leftArrow.addEventListener('click', moveLeft)
|
|
rightArrow.addEventListener('click', doRight)
|
|
}
|
|
imageEl.addEventListener('click', openImg)
|
|
}
|
|
|
|
module.exports = {
|
|
setup,
|
|
}
|
|
|
|
},{}],7:[function(require,module,exports){
|
|
const { manager } = require('./datamanager.js')
|
|
const storageModule = require('./storage.js')
|
|
|
|
const genericSort = (list, key, ascending, customOrder) => {
|
|
let sorted
|
|
if (customOrder) {
|
|
sorted = list.sort((a, b) => {
|
|
const aValue = a.result.toLowerCase()
|
|
const bValue = b.result.toLowerCase()
|
|
|
|
const aIndex = customOrder.findIndex((item) => item.toLowerCase() === aValue)
|
|
const bIndex = customOrder.findIndex((item) => item.toLowerCase() === bValue)
|
|
|
|
// Compare the indices to determine the sort order
|
|
return aIndex - bIndex
|
|
})
|
|
} else {
|
|
sorted = list.sort((a, b) => a[key] === b[key] ? 0 : a[key] > b[key] ? 1 : -1)
|
|
}
|
|
|
|
if (ascending) {
|
|
sorted.reverse()
|
|
}
|
|
return sorted
|
|
}
|
|
|
|
const durationSort = (list, ascending) => {
|
|
const parseDuration = (duration) => {
|
|
if (duration.includes(':')) {
|
|
// If it's in the format "HH:mm:ss"
|
|
const [hours, minutes, seconds] = duration.split(':').map(Number)
|
|
return (hours * 3600 + minutes * 60 + seconds) * 1000
|
|
} else {
|
|
// If it's in the format "nnn ms"
|
|
return parseInt(duration)
|
|
}
|
|
}
|
|
const sorted = list.sort((a, b) => parseDuration(a['duration']) - parseDuration(b['duration']))
|
|
if (ascending) {
|
|
sorted.reverse()
|
|
}
|
|
return sorted
|
|
}
|
|
|
|
const doInitSort = () => {
|
|
const type = storageModule.getSort(manager.initialSort)
|
|
const ascending = storageModule.getSortDirection()
|
|
const list = manager.testSubset
|
|
const initialOrder = ['Error', 'Failed', 'Rerun', 'XFailed', 'XPassed', 'Skipped', 'Passed']
|
|
|
|
storageModule.setSort(type)
|
|
storageModule.setSortDirection(ascending)
|
|
|
|
if (type?.toLowerCase() === 'original') {
|
|
manager.setRender(list)
|
|
} else {
|
|
let sortedList
|
|
switch (type) {
|
|
case 'duration':
|
|
sortedList = durationSort(list, ascending)
|
|
break
|
|
case 'result':
|
|
sortedList = genericSort(list, type, ascending, initialOrder)
|
|
break
|
|
default:
|
|
sortedList = genericSort(list, type, ascending)
|
|
break
|
|
}
|
|
manager.setRender(sortedList)
|
|
}
|
|
}
|
|
|
|
const doSort = (type, skipDirection) => {
|
|
const newSortType = storageModule.getSort(manager.initialSort) !== type
|
|
const currentAsc = storageModule.getSortDirection()
|
|
let ascending
|
|
if (skipDirection) {
|
|
ascending = currentAsc
|
|
} else {
|
|
ascending = newSortType ? false : !currentAsc
|
|
}
|
|
storageModule.setSort(type)
|
|
storageModule.setSortDirection(ascending)
|
|
|
|
const list = manager.testSubset
|
|
const sortedList = type === 'duration' ? durationSort(list, ascending) : genericSort(list, type, ascending)
|
|
manager.setRender(sortedList)
|
|
}
|
|
|
|
module.exports = {
|
|
doInitSort,
|
|
doSort,
|
|
}
|
|
|
|
},{"./datamanager.js":1,"./storage.js":8}],8:[function(require,module,exports){
|
|
const possibleFilters = [
|
|
'passed',
|
|
'skipped',
|
|
'failed',
|
|
'error',
|
|
'xfailed',
|
|
'xpassed',
|
|
'rerun',
|
|
]
|
|
|
|
const getVisible = () => {
|
|
const url = new URL(window.location.href)
|
|
const settings = new URLSearchParams(url.search).get('visible')
|
|
const lower = (item) => {
|
|
const lowerItem = item.toLowerCase()
|
|
if (possibleFilters.includes(lowerItem)) {
|
|
return lowerItem
|
|
}
|
|
return null
|
|
}
|
|
return settings === null ?
|
|
possibleFilters :
|
|
[...new Set(settings?.split(',').map(lower).filter((item) => item))]
|
|
}
|
|
|
|
const hideCategory = (categoryToHide) => {
|
|
const url = new URL(window.location.href)
|
|
const visibleParams = new URLSearchParams(url.search).get('visible')
|
|
const currentVisible = visibleParams ? visibleParams.split(',') : [...possibleFilters]
|
|
const settings = [...new Set(currentVisible)].filter((f) => f !== categoryToHide).join(',')
|
|
|
|
url.searchParams.set('visible', settings)
|
|
window.history.pushState({}, null, unescape(url.href))
|
|
}
|
|
|
|
const showCategory = (categoryToShow) => {
|
|
if (typeof window === 'undefined') {
|
|
return
|
|
}
|
|
const url = new URL(window.location.href)
|
|
const currentVisible = new URLSearchParams(url.search).get('visible')?.split(',').filter(Boolean) ||
|
|
[...possibleFilters]
|
|
const settings = [...new Set([categoryToShow, ...currentVisible])]
|
|
const noFilter = possibleFilters.length === settings.length || !settings.length
|
|
|
|
noFilter ? url.searchParams.delete('visible') : url.searchParams.set('visible', settings.join(','))
|
|
window.history.pushState({}, null, unescape(url.href))
|
|
}
|
|
|
|
const getSort = (initialSort) => {
|
|
const url = new URL(window.location.href)
|
|
let sort = new URLSearchParams(url.search).get('sort')
|
|
if (!sort) {
|
|
sort = initialSort || 'result'
|
|
}
|
|
return sort
|
|
}
|
|
|
|
const setSort = (type) => {
|
|
const url = new URL(window.location.href)
|
|
url.searchParams.set('sort', type)
|
|
window.history.pushState({}, null, unescape(url.href))
|
|
}
|
|
|
|
const getCollapsedCategory = (renderCollapsed) => {
|
|
let categories
|
|
if (typeof window !== 'undefined') {
|
|
const url = new URL(window.location.href)
|
|
const collapsedItems = new URLSearchParams(url.search).get('collapsed')
|
|
switch (true) {
|
|
case !renderCollapsed && collapsedItems === null:
|
|
categories = ['passed']
|
|
break
|
|
case collapsedItems?.length === 0 || /^["']{2}$/.test(collapsedItems):
|
|
categories = []
|
|
break
|
|
case /^all$/.test(collapsedItems) || collapsedItems === null && /^all$/.test(renderCollapsed):
|
|
categories = [...possibleFilters]
|
|
break
|
|
default:
|
|
categories = collapsedItems?.split(',').map((item) => item.toLowerCase()) || renderCollapsed
|
|
break
|
|
}
|
|
} else {
|
|
categories = []
|
|
}
|
|
return categories
|
|
}
|
|
|
|
const getSortDirection = () => JSON.parse(sessionStorage.getItem('sortAsc')) || false
|
|
const setSortDirection = (ascending) => sessionStorage.setItem('sortAsc', ascending)
|
|
|
|
const getCollapsedIds = () => JSON.parse(sessionStorage.getItem('collapsedIds')) || []
|
|
const setCollapsedIds = (list) => sessionStorage.setItem('collapsedIds', JSON.stringify(list))
|
|
|
|
module.exports = {
|
|
getVisible,
|
|
hideCategory,
|
|
showCategory,
|
|
getCollapsedIds,
|
|
setCollapsedIds,
|
|
getSort,
|
|
setSort,
|
|
getSortDirection,
|
|
setSortDirection,
|
|
getCollapsedCategory,
|
|
possibleFilters,
|
|
}
|
|
|
|
},{}]},{},[4]);
|
|
</script>
|
|
</footer>
|
|
</html> |