Table of Contents
Test Report
View CI Run 2209 | Commit 255ab18
🧪 Test Report
Generated on 2025-08-14 11:19:03 CEST
🧾 General Info
- duration: 5.374978303909302
- root: /workspace/tligui_y/slic
- environment: {}
📋 Summary
- Passed: 1
- Failed: 4
- Total: 5
- Collected: 5
🔎 Tests
✅ Passed (1)
-
📄 test_utils_elog.py
↳ Function: test_get_default_elog_instance_with_direct_password_and_real_check
-
✅ Test 1
📌 Setup phase
duration:
0.00035803718492388725outcome:
passed📌 Call phase
duration:
0.048714672680944204outcome:
passed📌 Teardown phase
duration:
0.00030360324308276176outcome:
passed
-
❌ Failed (4)
-
📄 test_utils_elog.py
↳ Function: test_get_default_elog_instance_with_wrong_password_and_real_check
-
❌ Test 2
📌 Setup phase
duration:
0.00013593584299087524outcome:
passed📌 Call phase
duration:
0.003275215160101652outcome:
failedcrash:
path: /workspace/tligui_y/slic/tests/test_utils_elog.py lineno: 45 message: AttributeError: 'Elog' object has no attribute 'LogbookAuthenticationError'traceback:
- path: tests/test_utils_elog.py lineno: 45 message: AttributeErrorlongrepr:
def test_get_default_elog_instance_with_wrong_password_and_real_check(): url = "http://localhost:8080/demo" user = "robot" wrong_password = "wrongpassword" elog = Elog(url, user=user, password=wrong_password) > with pytest.raises(elog.LogbookAuthenticationError): E AttributeError: 'Elog' object has no attribute 'LogbookAuthenticationError' tests/test_utils_elog.py:45: AttributeError📌 Teardown phase
duration:
0.00027278997004032135outcome:
passed
↳ Function: test_get_default_elog_instance_asks_password_and_opens
-
❌ Test 3
📌 Setup phase
duration:
0.00013766111806035042outcome:
passed📌 Call phase
duration:
0.009406332857906818outcome:
failedcrash:
path: /workspace/tligui_y/slic/tests/test_utils_elog.py lineno: 64 message: NameError: name 'url' is not definedtraceback:
- path: tests/test_utils_elog.py lineno: 64 message: NameErrorlongrepr:
mock_home = <MagicMock name='home' id='140171642009536'> mock_getpass = <MagicMock name='getpass' id='140171641108800'> @patch("slic.utils.elog.getpass") @patch("slic.utils.elog.Path.home") def test_get_default_elog_instance_asks_password_and_opens(mock_home, mock_getpass): mock_home.return_value = Path("/does/not/exist") # Fausse home → lecture échoue mock_getpass.return_value = "testpassword" user = "robot" text = "This is a message" elog = Elog("http://localhost:8080/demo", user=user) try: elog.post(text) except Exception as e: pytest.fail(f"elog.open() raised an unexpected exception: {e}") > response = requests.get(url) E NameError: name 'url' is not defined tests/test_utils_elog.py:64: NameError📌 Teardown phase
duration:
0.00024532992392778397outcome:
passed
↳ Function: test_get_default_elog_with_path_home
-
❌ Test 4
📌 Setup phase
duration:
0.0001370469108223915outcome:
passed📌 Call phase
duration:
0.00959764700382948outcome:
failedcrash:
path: /workspace/tligui_y/slic/tests/test_utils_elog.py lineno: 95 message: NameError: name 'url' is not definedtraceback:
- path: tests/test_utils_elog.py lineno: 95 message: NameErrorlongrepr:
mock_home = <MagicMock name='home' id='140171641207200'> mock_getuser = <MagicMock name='getuser' id='140171641212992'> mock_getpass = <MagicMock name='getpass' id='140171641098000'> @patch("slic.utils.elog.getpass") @patch("slic.utils.elog.getuser") @patch("slic.utils.elog.Path.home") def test_get_default_elog_with_path_home(mock_home, mock_getuser, mock_getpass): fake_user = "robot" fake_pw = "testpassword" mock_getuser.return_value = fake_user mock_getpass.return_value = fake_pw # fallback safety text = "This is a message" tmp_home = Path("/tmp/fake_home_for_robot") tmp_home.mkdir(parents=True, exist_ok=True) pw_file = tmp_home / ".elog_psi" pw_file.write_text(fake_pw) mock_home.return_value = tmp_home try: elog = Elog("http://localhost:8080/demo") try: elog.post(text) except Exception as e: pytest.fail(f"elog.open() raised an unexpected exception: {e}") > response = requests.get(url) E NameError: name 'url' is not defined tests/test_utils_elog.py:95: NameError📌 Teardown phase
duration:
0.0002172510139644146outcome:
passed
↳ Function: test_screenshot
-
❌ Test 5
📌 Setup phase
duration:
0.00013875775039196014outcome:
passed📌 Call phase
duration:
0.0013368171639740467outcome:
failedcrash:
path: /workspace/tligui_y/slic/tests/test_utils_elog.py lineno: 129 message: NameError: name 'get_test_elog' is not definedtraceback:
- path: tests/test_utils_elog.py lineno: 129 message: NameErrorlongrepr:
mock_screenshot_class = <MagicMock name='Screenshot' id='140171641148080'> @patch("slic.utils.elog.Screenshot") def test_screenshot(mock_screenshot_class): fake_path = "/tmp/fake_screenshot.png" with open(fake_path, "wb") as f: f.write(b"fake image data") mock_instance = mock_screenshot_class.return_value mock_instance.shoot.return_value = [fake_path] > elog = get_test_elog() E NameError: name 'get_test_elog' is not defined tests/test_utils_elog.py:129: NameError📌 Teardown phase
duration:
0.0001849220134317875outcome:
passed
-
📚 Collected files
✅ (1 tests)
-
✅
- Outcome:
passed - result:
- nodeid: tests/test_utils_elog.py type: Module - Outcome:
✅ tests (1 tests)
-
✅ tests/test_utils_elog.py
- Outcome:
passed - result:
- nodeid: tests/test_utils_elog.py::test_get_default_elog_instance_with_direct_password_and_real_check type: Function lineno: 12 - nodeid: tests/test_utils_elog.py::test_get_default_elog_instance_with_wrong_password_and_real_check type: Function lineno: 37 - nodeid: tests/test_utils_elog.py::test_get_default_elog_instance_asks_password_and_opens type: Function lineno: 48 - nodeid: tests/test_utils_elog.py::test_get_default_elog_with_path_home type: Function lineno: 71 - nodeid: tests/test_utils_elog.py::test_screenshot type: Function lineno: 119 - 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