Table of Contents
Test Report
View CI Run 2290 | Commit 0eae800
🧪 Test Report
Generated on 2025-08-15 15:41:51 CEST
🧾 General Info
- duration: 5.409201145172119
- root: /workspace/tligui_y/slic
- environment: {}
📋 Summary
- Failed: 5
- Total: 5
- Collected: 5
🔎 Tests
❌ Failed (5)
-
📄 test_utils_elog.py
↳ Function: test_get_default_elog_instance_with_direct_password_and_real_check
-
❌ Test 1
📌 Setup phase
duration:
0.0003699902445077896outcome:
passed📌 Call phase
duration:
0.012129244860261679outcome:
failedcrash:
path: /workspace/tligui_y/slic/tests/test_utils_elog.py lineno: 24 message: Failed: elog.open() raised an unexpected exception: Rejected because of: New entry cannot be written to directory "/usr/local/elog/logbooks/demo/" Please check that it exists and elogd has write access and disk is not fulltraceback:
- path: tests/test_utils_elog.py lineno: 24 message: Failedlongrepr:
def test_get_default_elog_instance_with_direct_password_and_real_check(): url = "http://localhost:8080/demo" user = "robot" password = "testpassword" text = "This is a message1" elog = Elog("http://localhost:8080/demo", user=user, password=password) try: > elog.post(text) tests/test_utils_elog.py:22: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ slic/utils/elog.py:17: in post return self._log.post(*args, **kwargs) slic/utils/logbook.py:273: in post resp_message, resp_headers, resp_msg_id = _validate_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ response = <Response [404]> def _validate_response(response): """ Validate response of the request.""" print("[DEBUG] _validate_response called") print(f" HTTP status code : {response.status_code}") print(f" Response headers : {response.headers}") print(f" First 300 bytes of content:\n{response.content[:300]!r}") msg_id = None if response.status_code not in [200, 302]: print("[DEBUG] Status not 200/302 → searching for <td class='errormsg'>") err = re.findall('<td.*?class="errormsg".*?>.*?</td>', response.content.decode('utf-8', 'ignore'), flags=re.DOTALL) if len(err) > 0: err = re.sub('(?:<.*?>)', '', err[0]) print(f"[DEBUG] Found error message: {err}") if err: > raise LogbookMessageRejected('Rejected because of: ' + err) E slic.utils.logbook_exceptions.LogbookMessageRejected: Rejected because of: New entry cannot be written to directory "/usr/local/elog/logbooks/demo/" E Please check that it exists and elogd has write access and disk is not full slic/utils/logbook.py:811: LogbookMessageRejected During handling of the above exception, another exception occurred: def test_get_default_elog_instance_with_direct_password_and_real_check(): url = "http://localhost:8080/demo" user = "robot" password = "testpassword" text = "This is a message1" elog = Elog("http://localhost:8080/demo", user=user, password=password) try: elog.post(text) except Exception as e: > pytest.fail(f"elog.open() raised an unexpected exception: {e}") E Failed: elog.open() raised an unexpected exception: Rejected because of: New entry cannot be written to directory "/usr/local/elog/logbooks/demo/" E Please check that it exists and elogd has write access and disk is not full tests/test_utils_elog.py:24: Failed📌 Teardown phase
duration:
0.00031213322654366493outcome:
passed
↳ Function: test_get_default_elog_instance_with_wrong_password_and_real_check
-
❌ Test 2
📌 Setup phase
duration:
0.00014651194214820862outcome:
passed📌 Call phase
duration:
0.003360208123922348outcome:
failedcrash:
path: /workspace/tligui_y/slic/tests/test_utils_elog.py lineno: 44 message: Failed: DID NOT RAISE <class 'elog.logbook_exceptions.LogbookAuthenticationError'>traceback:
- path: tests/test_utils_elog.py lineno: 44 message: Failedlongrepr:
def test_get_default_elog_instance_with_wrong_password_and_real_check(): url = "http://localhost:8080/demo" user = "robot" wrong_password = "wrongpassword" with pytest.raises(LogbookAuthenticationError): > Elog(url, user=user, password=wrong_password) E Failed: DID NOT RAISE <class 'elog.logbook_exceptions.LogbookAuthenticationError'> tests/test_utils_elog.py:44: Failed📌 Teardown phase
duration:
0.00023058615624904633outcome:
passed
↳ Function: test_get_default_elog_instance_asks_password_and_opens
-
❌ Test 3
📌 Setup phase
duration:
0.00013550091534852982outcome:
passed📌 Call phase
duration:
0.007514926139265299outcome:
failedcrash:
path: /workspace/tligui_y/slic/tests/test_utils_elog.py lineno: 61 message: Failed: elog.open() raised an unexpected exception: Rejected because of: New entry cannot be written to directory "/usr/local/elog/logbooks/demo/" Please check that it exists and elogd has write access and disk is not fulltraceback:
- path: tests/test_utils_elog.py lineno: 61 message: Failedlongrepr:
mock_home = <MagicMock name='home' id='140389951908880'> mock_getpass = <MagicMock name='getpass' id='140389948165376'> @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 message2" url = "http://localhost:8080/demo" elog = Elog("http://localhost:8080/demo", user=user) try: > elog.post(text) tests/test_utils_elog.py:59: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ slic/utils/elog.py:17: in post return self._log.post(*args, **kwargs) slic/utils/logbook.py:273: in post resp_message, resp_headers, resp_msg_id = _validate_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ response = <Response [404]> def _validate_response(response): """ Validate response of the request.""" print("[DEBUG] _validate_response called") print(f" HTTP status code : {response.status_code}") print(f" Response headers : {response.headers}") print(f" First 300 bytes of content:\n{response.content[:300]!r}") msg_id = None if response.status_code not in [200, 302]: print("[DEBUG] Status not 200/302 → searching for <td class='errormsg'>") err = re.findall('<td.*?class="errormsg".*?>.*?</td>', response.content.decode('utf-8', 'ignore'), flags=re.DOTALL) if len(err) > 0: err = re.sub('(?:<.*?>)', '', err[0]) print(f"[DEBUG] Found error message: {err}") if err: > raise LogbookMessageRejected('Rejected because of: ' + err) E slic.utils.logbook_exceptions.LogbookMessageRejected: Rejected because of: New entry cannot be written to directory "/usr/local/elog/logbooks/demo/" E Please check that it exists and elogd has write access and disk is not full slic/utils/logbook.py:811: LogbookMessageRejected During handling of the above exception, another exception occurred: mock_home = <MagicMock name='home' id='140389951908880'> mock_getpass = <MagicMock name='getpass' id='140389948165376'> @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 message2" url = "http://localhost:8080/demo" 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}") E Failed: elog.open() raised an unexpected exception: Rejected because of: New entry cannot be written to directory "/usr/local/elog/logbooks/demo/" E Please check that it exists and elogd has write access and disk is not full tests/test_utils_elog.py:61: Failed📌 Teardown phase
duration:
0.00020198803395032883outcome:
passed
↳ Function: test_get_default_elog_with_path_home
-
❌ Test 4
📌 Setup phase
duration:
0.00013508321717381477outcome:
passed📌 Call phase
duration:
0.007682305760681629outcome:
failedcrash:
path: /workspace/tligui_y/slic/tests/test_utils_elog.py lineno: 95 message: Failed: elog.open() raised an unexpected exception: Rejected because of: New entry cannot be written to directory "/usr/local/elog/logbooks/demo/" Please check that it exists and elogd has write access and disk is not fulltraceback:
- path: tests/test_utils_elog.py lineno: 95 message: Failedlongrepr:
mock_home = <MagicMock name='home' id='140389945753408'> mock_getuser = <MagicMock name='getuser' id='140389948033344'> mock_getpass = <MagicMock name='getpass' id='140389946022400'> @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 message3" url = "http://localhost:8080/demo" 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) tests/test_utils_elog.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ slic/utils/elog.py:17: in post return self._log.post(*args, **kwargs) slic/utils/logbook.py:273: in post resp_message, resp_headers, resp_msg_id = _validate_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ response = <Response [404]> def _validate_response(response): """ Validate response of the request.""" print("[DEBUG] _validate_response called") print(f" HTTP status code : {response.status_code}") print(f" Response headers : {response.headers}") print(f" First 300 bytes of content:\n{response.content[:300]!r}") msg_id = None if response.status_code not in [200, 302]: print("[DEBUG] Status not 200/302 → searching for <td class='errormsg'>") err = re.findall('<td.*?class="errormsg".*?>.*?</td>', response.content.decode('utf-8', 'ignore'), flags=re.DOTALL) if len(err) > 0: err = re.sub('(?:<.*?>)', '', err[0]) print(f"[DEBUG] Found error message: {err}") if err: > raise LogbookMessageRejected('Rejected because of: ' + err) E slic.utils.logbook_exceptions.LogbookMessageRejected: Rejected because of: New entry cannot be written to directory "/usr/local/elog/logbooks/demo/" E Please check that it exists and elogd has write access and disk is not full slic/utils/logbook.py:811: LogbookMessageRejected During handling of the above exception, another exception occurred: mock_home = <MagicMock name='home' id='140389945753408'> mock_getuser = <MagicMock name='getuser' id='140389948033344'> mock_getpass = <MagicMock name='getpass' id='140389946022400'> @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 message3" url = "http://localhost:8080/demo" 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}") E Failed: elog.open() raised an unexpected exception: Rejected because of: New entry cannot be written to directory "/usr/local/elog/logbooks/demo/" E Please check that it exists and elogd has write access and disk is not full tests/test_utils_elog.py:95: Failed📌 Teardown phase
duration:
0.00022714398801326752outcome:
passed
↳ Function: test_screenshot
-
❌ Test 5
📌 Setup phase
duration:
0.00013446109369397163outcome:
passed📌 Call phase
duration:
0.007611086126416922outcome:
failedcrash:
path: /workspace/tligui_y/slic/slic/utils/logbook.py lineno: 811 message: slic.utils.logbook_exceptions.LogbookMessageRejected: Rejected because of: Cannot write attachment file "/usr/local/elog/logbooks/demo/2025/250815_134148_fake_screenshot.png"traceback:
- path: tests/test_utils_elog.py lineno: 134 message: None - path: slic/utils/elog.py lineno: 22 message: in screenshot - path: slic/utils/elog.py lineno: 17 message: in post - path: slic/utils/logbook.py lineno: 273 message: in post - path: slic/utils/logbook.py lineno: 811 message: LogbookMessageRejectedlongrepr:
mock_screenshot_class = <MagicMock name='Screenshot' id='140389945902656'> @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 = elog = Elog("http://localhost:8080/demo", user="robot", password="testpassword") test_msg = "SCREENSHOT_INTEGRATION_TEST_MSG_456" > elog.screenshot(message=test_msg) tests/test_utils_elog.py:134: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ slic/utils/elog.py:22: in screenshot self.post(message, **kwargs) slic/utils/elog.py:17: in post return self._log.post(*args, **kwargs) slic/utils/logbook.py:273: in post resp_message, resp_headers, resp_msg_id = _validate_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ response = <Response [404]> def _validate_response(response): """ Validate response of the request.""" print("[DEBUG] _validate_response called") print(f" HTTP status code : {response.status_code}") print(f" Response headers : {response.headers}") print(f" First 300 bytes of content:\n{response.content[:300]!r}") msg_id = None if response.status_code not in [200, 302]: print("[DEBUG] Status not 200/302 → searching for <td class='errormsg'>") err = re.findall('<td.*?class="errormsg".*?>.*?</td>', response.content.decode('utf-8', 'ignore'), flags=re.DOTALL) if len(err) > 0: err = re.sub('(?:<.*?>)', '', err[0]) print(f"[DEBUG] Found error message: {err}") if err: > raise LogbookMessageRejected('Rejected because of: ' + err) E slic.utils.logbook_exceptions.LogbookMessageRejected: Rejected because of: Cannot write attachment file "/usr/local/elog/logbooks/demo/2025/250815_134148_fake_screenshot.png" slic/utils/logbook.py:811: LogbookMessageRejected📌 Teardown phase
duration:
0.00022357096895575523outcome:
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: 46 - nodeid: tests/test_utils_elog.py::test_get_default_elog_with_path_home type: Function lineno: 72 - nodeid: tests/test_utils_elog.py::test_screenshot type: Function lineno: 121 - 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