Table of Contents
Test Report
View CI Run 2285 | Commit ed43cfc
🧪 Test Report
Generated on 2025-08-15 12:02:01 CEST
🧾 General Info
- duration: 6.014517307281494
- 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.00043773092329502106outcome:
passed📌 Call phase
duration:
0.010562647134065628outcome:
failedcrash:
path: /workspace/tligui_y/slic/tests/test_utils_elog.py lineno: 24 message: Failed: elog.open() raised an unexpected exception: Invalid username or password.traceback:
- 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 [200]> 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) else: raise LogbookMessageRejected('Rejected because of unknown error.') raise LogbookMessageRejected('Rejected because of unknown error.') else: location = response.headers.get('Location') if location is not None: print(f"[DEBUG] Location header: {location}") if 'has moved' in location: raise LogbookServerProblem('Logbook server has moved to another location.') elif 'fail' in location: raise LogbookAuthenticationError('Invalid username or password.') else: try: msg_id = int(urllib.parse.urlsplit(location).path.split('/')[-1]) print(f"[DEBUG] Parsed msg_id from Location: {msg_id}") except ValueError: print("[DEBUG] Could not parse msg_id from Location") msg_id = None if b'type=password' in response.content or b'type="password"' in response.content: print("[DEBUG] Password input detected in response HTML — assuming login page → AUTH ERROR") > raise LogbookAuthenticationError('Invalid username or password.') E slic.utils.logbook_exceptions.LogbookAuthenticationError: Invalid username or password. slic/utils/logbook.py:833: LogbookAuthenticationError 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: Invalid username or password. tests/test_utils_elog.py:24: Failed📌 Teardown phase
duration:
0.0004219082184135914outcome:
passed
↳ Function: test_get_default_elog_instance_with_wrong_password_and_real_check
-
❌ Test 2
📌 Setup phase
duration:
0.00015983683988451958outcome:
passed📌 Call phase
duration:
0.0035495939664542675outcome:
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.00024757208302617073outcome:
passed
↳ Function: test_get_default_elog_instance_asks_password_and_opens
-
❌ Test 3
📌 Setup phase
duration:
0.00014526722952723503outcome:
passed📌 Call phase
duration:
0.008798753842711449outcome:
failedcrash:
path: /workspace/tligui_y/slic/tests/test_utils_elog.py lineno: 61 message: Failed: elog.open() raised an unexpected exception: Invalid username or password.traceback:
- path: tests/test_utils_elog.py lineno: 61 message: Failedlongrepr:
mock_home = <MagicMock name='home' id='139635389430560'> mock_getpass = <MagicMock name='getpass' id='139635395655952'> @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 [200]> 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) else: raise LogbookMessageRejected('Rejected because of unknown error.') raise LogbookMessageRejected('Rejected because of unknown error.') else: location = response.headers.get('Location') if location is not None: print(f"[DEBUG] Location header: {location}") if 'has moved' in location: raise LogbookServerProblem('Logbook server has moved to another location.') elif 'fail' in location: raise LogbookAuthenticationError('Invalid username or password.') else: try: msg_id = int(urllib.parse.urlsplit(location).path.split('/')[-1]) print(f"[DEBUG] Parsed msg_id from Location: {msg_id}") except ValueError: print("[DEBUG] Could not parse msg_id from Location") msg_id = None if b'type=password' in response.content or b'type="password"' in response.content: print("[DEBUG] Password input detected in response HTML — assuming login page → AUTH ERROR") > raise LogbookAuthenticationError('Invalid username or password.') E slic.utils.logbook_exceptions.LogbookAuthenticationError: Invalid username or password. slic/utils/logbook.py:833: LogbookAuthenticationError During handling of the above exception, another exception occurred: mock_home = <MagicMock name='home' id='139635389430560'> mock_getpass = <MagicMock name='getpass' id='139635395655952'> @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: Invalid username or password. tests/test_utils_elog.py:61: Failed📌 Teardown phase
duration:
0.0002862350083887577outcome:
passed
↳ Function: test_get_default_elog_with_path_home
-
❌ Test 4
📌 Setup phase
duration:
0.00014842068776488304outcome:
passed📌 Call phase
duration:
0.009000149089843035outcome:
failedcrash:
path: /workspace/tligui_y/slic/tests/test_utils_elog.py lineno: 95 message: Failed: elog.open() raised an unexpected exception: Invalid username or password.traceback:
- path: tests/test_utils_elog.py lineno: 95 message: Failedlongrepr:
mock_home = <MagicMock name='home' id='139635389846528'> mock_getuser = <MagicMock name='getuser' id='139635389857552'> mock_getpass = <MagicMock name='getpass' id='139635389859872'> @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 [200]> 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) else: raise LogbookMessageRejected('Rejected because of unknown error.') raise LogbookMessageRejected('Rejected because of unknown error.') else: location = response.headers.get('Location') if location is not None: print(f"[DEBUG] Location header: {location}") if 'has moved' in location: raise LogbookServerProblem('Logbook server has moved to another location.') elif 'fail' in location: raise LogbookAuthenticationError('Invalid username or password.') else: try: msg_id = int(urllib.parse.urlsplit(location).path.split('/')[-1]) print(f"[DEBUG] Parsed msg_id from Location: {msg_id}") except ValueError: print("[DEBUG] Could not parse msg_id from Location") msg_id = None if b'type=password' in response.content or b'type="password"' in response.content: print("[DEBUG] Password input detected in response HTML — assuming login page → AUTH ERROR") > raise LogbookAuthenticationError('Invalid username or password.') E slic.utils.logbook_exceptions.LogbookAuthenticationError: Invalid username or password. slic/utils/logbook.py:833: LogbookAuthenticationError During handling of the above exception, another exception occurred: mock_home = <MagicMock name='home' id='139635389846528'> mock_getuser = <MagicMock name='getuser' id='139635389857552'> mock_getpass = <MagicMock name='getpass' id='139635389859872'> @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: Invalid username or password. tests/test_utils_elog.py:95: Failed📌 Teardown phase
duration:
0.000289801973849535outcome:
passed
↳ Function: test_screenshot
-
❌ Test 5
📌 Setup phase
duration:
0.000151841901242733outcome:
passed📌 Call phase
duration:
0.012742570135742426outcome:
failedcrash:
path: /workspace/tligui_y/slic/slic/utils/logbook.py lineno: 833 message: slic.utils.logbook_exceptions.LogbookAuthenticationError: Invalid username or password.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: 833 message: LogbookAuthenticationErrorlongrepr:
mock_screenshot_class = <MagicMock name='Screenshot' id='139635388724800'> @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 [200]> 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) else: raise LogbookMessageRejected('Rejected because of unknown error.') raise LogbookMessageRejected('Rejected because of unknown error.') else: location = response.headers.get('Location') if location is not None: print(f"[DEBUG] Location header: {location}") if 'has moved' in location: raise LogbookServerProblem('Logbook server has moved to another location.') elif 'fail' in location: raise LogbookAuthenticationError('Invalid username or password.') else: try: msg_id = int(urllib.parse.urlsplit(location).path.split('/')[-1]) print(f"[DEBUG] Parsed msg_id from Location: {msg_id}") except ValueError: print("[DEBUG] Could not parse msg_id from Location") msg_id = None if b'type=password' in response.content or b'type="password"' in response.content: print("[DEBUG] Password input detected in response HTML — assuming login page → AUTH ERROR") > raise LogbookAuthenticationError('Invalid username or password.') E slic.utils.logbook_exceptions.LogbookAuthenticationError: Invalid username or password. slic/utils/logbook.py:833: LogbookAuthenticationError📌 Teardown phase
duration:
0.0002909940667450428outcome:
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