Table of Contents
Test Report
View CI Run 2195 | Commit 9c62281
🧪 Test Report
Generated on 2025-08-13 14:30:42 CEST
🧾 General Info
- duration: 13.132273197174072
- root: /workspace/tligui_y/slic
- environment: {}
📋 Summary
- Passed: 7
- Failed: 1
- Total: 8
- Collected: 8
🔎 Tests
✅ Passed (7)
-
📄 test_utils_pv.py
↳ Function: test_put_with_progress_and_repr
-
✅ Test 1
params: value_new=25, value_before=0, show_bar=true, expected_color="\u001b[32m"📌 Runtime Parameters
params: value_new: 25 value_before: 0 show_bar: True expected_color: [32m id: 25-0-True-\x1b[32m📌 Setup phase
duration:
0.0006821118295192719outcome:
passed📌 Call phase
duration:
1.1412426307797432outcome:
passed📌 Teardown phase
duration:
0.0008415519259870052outcome:
passed -
✅ Test 2
params: value_new=50, value_before=25, show_bar=true, expected_color="\u001b[32m"📌 Runtime Parameters
params: value_new: 50 value_before: 25 show_bar: True expected_color: [32m id: 50-25-True-\x1b[32m📌 Setup phase
duration:
0.0006170310080051422outcome:
passed📌 Call phase
duration:
1.0041942470707outcome:
passed📌 Teardown phase
duration:
0.00026140501722693443outcome:
passed -
✅ Test 4
params: value_new=100, value_before=75, show_bar=true, expected_color="\u001b[32m"📌 Runtime Parameters
params: value_new: 100 value_before: 75 show_bar: True expected_color: [32m id: 100-75-True-\x1b[32m📌 Setup phase
duration:
0.00038302503526210785outcome:
passed📌 Call phase
duration:
1.0083486530929804outcome:
passed📌 Teardown phase
duration:
0.000402337871491909outcome:
passed -
✅ Test 5
params: value_new=150, value_before=100, show_bar=false, expected_color="\u001b[32m"📌 Runtime Parameters
params: value_new: 150 value_before: 100 show_bar: False expected_color: [32m id: 150-100-False-\x1b[32m📌 Setup phase
duration:
0.00054553197696805outcome:
passed📌 Call phase
duration:
1.0041209068149328outcome:
passed📌 Teardown phase
duration:
0.0004024682566523552outcome:
passed -
✅ Test 6
params: value_new=-50, value_before=150, show_bar=true, expected_color="\u001b[32m"📌 Runtime Parameters
params: value_new: -50 value_before: 150 show_bar: True expected_color: [32m id: -50-150-True-\x1b[32m📌 Setup phase
duration:
0.0005770758725702763outcome:
passed📌 Call phase
duration:
1.0088199242018163outcome:
passed📌 Teardown phase
duration:
0.00023917993530631065outcome:
passed
↳ Function: test_use_callback_context_manager
-
✅ Test 7
📌 Setup phase
duration:
0.00015170732513070107outcome:
passed📌 Call phase
duration:
2.008928620722145outcome:
passed📌 Teardown phase
duration:
0.00017909565940499306outcome:
passed
↳ Function: test_orig_repr_is_not_custom_repr
-
✅ Test 8
📌 Setup phase
duration:
0.00014456361532211304outcome:
passed📌 Call phase
duration:
0.0015585273504257202outcome:
passed📌 Teardown phase
duration:
0.00013652071356773376outcome:
passed
-
❌ Failed (1)
-
📄 test_utils_pv.py
↳ Function: test_put_with_progress_and_repr
-
❌ Test 3
params: value_new=75, value_before=50, show_bar=false, expected_color="\u001b[32m"📌 Runtime Parameters
params: value_new: 75 value_before: 50 show_bar: False expected_color: [32m id: 75-50-False-\x1b[32m📌 Setup phase
duration:
0.00040395092219114304outcome:
passed📌 Call phase
duration:
1.0070649851113558outcome:
failedcrash:
path: /workspace/tligui_y/slic/tests/test_utils_pv.py lineno: 124 message: assert 50.0 == 75 + where 50.0 = get() + where get = PV "TEST:VAL" at 50.0 .gettraceback:
- path: tests/test_utils_pv.py lineno: 124 message: AssertionErrorlongrepr:
value_new = 75, value_before = 50, show_bar = False, expected_color = '\x1b[32m' @pytest.mark.parametrize("value_new, value_before, show_bar, expected_color", [ (25, 0, True, colorama.Fore.GREEN), (50, 25, True, colorama.Fore.GREEN), (75, 50, False, colorama.Fore.GREEN), (100, 75, True, colorama.Fore.GREEN), (150, 100, False, colorama.Fore.GREEN), (-50, 150, True, colorama.Fore.GREEN) ]) def test_put_with_progress_and_repr(value_new, value_before, show_bar, expected_color): pv = PV("TEST:VAL") pv.put(value_before) assert pv.get() == value_before # Capture tous les prints dans une liste printed_lines = [] def fake_print(*args, **kwargs): line = " ".join(str(a) for a in args) printed_lines.append(line) # Monkeypatch print uniquement dans ce contexte original_print = builtins.print builtins.print = fake_print try: pv.put(value_new, show_progress=show_bar) finally: builtins.print = original_print printed_lines = [line for line in printed_lines if line.strip()] cleaned_lines = [strip_ansi(line) for line in printed_lines] # Initialisation bar if show_bar==True: matches = [line for line in cleaned_lines if f"| |" in line] assert matches, f"Expected bar not found in:\n" + "\n".join(printed_lines) # Vérifie que la bonne barre a été affichée au moins une fois matches = [line for line in cleaned_lines if f"|██████████████████████████████|" in line] assert matches, f"Expected bar not found in:\n" + "\n".join(printed_lines) # Vérifie que la couleur est bien utilisée (au moins une fois dans les lignes printées) color_matches = [line for line in printed_lines if expected_color in line] assert color_matches, "Expected color code not found" assert all(f"{value_new}" in line for line in printed_lines), "new value not in all lines" assert all(f"{value_before}" in line for line in printed_lines), "old value not in all lines" else : assert len(printed_lines) == 0 # Vérifie que la valeur finale est correcte > assert pv.get() == value_new E assert 50.0 == 75 E + where 50.0 = get() E + where get = PV "TEST:VAL" at 50.0 .get tests/test_utils_pv.py:124: AssertionError📌 Teardown phase
duration:
0.00030675576999783516outcome:
passed
-
📚 Collected files
✅ (1 tests)
-
✅
- Outcome:
passed - result:
- nodeid: tests/test_utils_pv.py type: Module - Outcome:
✅ tests (1 tests)
-
✅ tests/test_utils_pv.py
- Outcome:
passed - result:
- nodeid: tests/test_utils_pv.py::test_put_with_progress_and_repr[25-0-True-\x1b[32m] type: Function lineno: 69 - nodeid: tests/test_utils_pv.py::test_put_with_progress_and_repr[50-25-True-\x1b[32m] type: Function lineno: 69 - nodeid: tests/test_utils_pv.py::test_put_with_progress_and_repr[75-50-False-\x1b[32m] type: Function lineno: 69 - nodeid: tests/test_utils_pv.py::test_put_with_progress_and_repr[100-75-True-\x1b[32m] type: Function lineno: 69 - nodeid: tests/test_utils_pv.py::test_put_with_progress_and_repr[150-100-False-\x1b[32m] type: Function lineno: 69 - nodeid: tests/test_utils_pv.py::test_put_with_progress_and_repr[-50-150-True-\x1b[32m] type: Function lineno: 69 - nodeid: tests/test_utils_pv.py::test_use_callback_context_manager type: Function lineno: 125 - nodeid: tests/test_utils_pv.py::test_orig_repr_is_not_custom_repr type: Function lineno: 151 - Outcome:
⚠️ Warnings
Warnings nº1
message: invalid escape sequence \-
category: DeprecationWarning
when: collect
filename: /workspace/tligui_y/slic/.pixi/envs/default/lib/python3.8/site-packages/bsread/h5.py
lineno: 207
Warnings nº2
message: The module numpy.dual is deprecated. Instead of using dual, use the functions directly from numpy or scipy.
category: DeprecationWarning
when: collect
filename: /workspace/tligui_y/slic/.pixi/envs/default/lib/python3.8/site-packages/scipy/fft/__init__.py
lineno: 97