Table of Contents
Test Report
View CI Run 2294 | Commit de89f06
🧪 Test Report
Generated on 2025-08-15 15:57:24 CEST
🧾 General Info
- duration: 5.501498699188232
- 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.00035783275961875916outcome:
passed📌 Call phase
duration:
0.08567149005830288outcome:
failedcrash:
path: /workspace/tligui_y/slic/tests/test_utils_elog.py lineno: 35 message: AssertionError: Message not found assert 'This\xa0is\xa0a\xa0message1' in '\n\n\nELOG Login\n\n\n\n\n\n\n\nPlease login\n\n\nUsername\n\n\n\n\nPassword\n\n\n\nKeep me logged in on this computer\nfor the next 31 days or until I log out\n\nForgot password?\n\nELOG V3.1.5-1272bc14\n'traceback:
- path: tests/test_utils_elog.py lineno: 35 message: AssertionErrorlongrepr:
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}") response = requests.get(url) print("Texte bruuuut :", response.content) soup = BeautifulSoup(response.content, 'html.parser') content = soup.get_text() print("Texte brut :", content) > assert 'This\xa0is\xa0a\xa0message1' in content, "Message not found" E AssertionError: Message not found E assert 'This\xa0is\xa0a\xa0message1' in '\n\n\nELOG Login\n\n\n\n\n\n\n\nPlease login\n\n\nUsername\n\n\n\n\nPassword\n\n\n\nKeep me logged in on this computer\nfor the next 31 days or until I log out\n\nForgot password?\n\nELOG V3.1.5-1272bc14\n' tests/test_utils_elog.py:35: AssertionError📌 Teardown phase
duration:
0.004292718134820461outcome:
passed
↳ Function: test_get_default_elog_instance_with_wrong_password_and_real_check
-
❌ Test 2
📌 Setup phase
duration:
0.00015237508341670036outcome:
passed📌 Call phase
duration:
0.0034396126866340637outcome:
failedcrash:
path: /workspace/tligui_y/slic/tests/test_utils_elog.py lineno: 45 message: Failed: DID NOT RAISE <class 'elog.logbook_exceptions.LogbookAuthenticationError'>traceback:
- path: tests/test_utils_elog.py lineno: 45 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:45: Failed📌 Teardown phase
duration:
0.0001537608914077282outcome:
passed
↳ Function: test_get_default_elog_instance_asks_password_and_opens
-
❌ Test 3
📌 Setup phase
duration:
0.00012818584218621254outcome:
passed📌 Call phase
duration:
0.05566797684878111outcome:
failedcrash:
path: /workspace/tligui_y/slic/tests/test_utils_elog.py lineno: 70 message: AssertionError: Message not found assert 'This\xa0is\xa0a\xa0message2' in '\n\n\nELOG Login\n\n\n\n\n\n\n\nPlease login\n\n\nUsername\n\n\n\n\nPassword\n\n\n\nKeep me logged in on this computer\nfor the next 31 days or until I log out\n\nForgot password?\n\nELOG V3.1.5-1272bc14\n'traceback:
- path: tests/test_utils_elog.py lineno: 70 message: AssertionErrorlongrepr:
mock_home = <MagicMock name='home' id='139984012713312'> mock_getpass = <MagicMock name='getpass' id='139984012829216'> @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}") response = requests.get(url) soup = BeautifulSoup(response.content, 'html.parser') content = soup.get_text() print("Password failing : ", content) > assert 'This\xa0is\xa0a\xa0message2' in content, "Message not found" E AssertionError: Message not found E assert 'This\xa0is\xa0a\xa0message2' in '\n\n\nELOG Login\n\n\n\n\n\n\n\nPlease login\n\n\nUsername\n\n\n\n\nPassword\n\n\n\nKeep me logged in on this computer\nfor the next 31 days or until I log out\n\nForgot password?\n\nELOG V3.1.5-1272bc14\n' tests/test_utils_elog.py:70: AssertionError📌 Teardown phase
duration:
0.0002206689678132534outcome:
passed
↳ Function: test_get_default_elog_with_path_home
-
❌ Test 4
📌 Setup phase
duration:
0.0001379242166876793outcome:
passed📌 Call phase
duration:
0.05658841086551547outcome:
failedcrash:
path: /workspace/tligui_y/slic/tests/test_utils_elog.py lineno: 102 message: AssertionError: Message not found assert 'This\xa0is\xa0a\xa0message3' in '\n\n\nELOG Login\n\n\n\n\n\n\n\nPlease login\n\n\nUsername\n\n\n\n\nPassword\n\n\n\nKeep me logged in on this computer\nfor the next 31 days or until I log out\n\nForgot password?\n\nELOG V3.1.5-1272bc14\n'traceback:
- path: tests/test_utils_elog.py lineno: 102 message: AssertionErrorlongrepr:
mock_home = <MagicMock name='home' id='139984011670432'> mock_getuser = <MagicMock name='getuser' id='139984011695536'> mock_getpass = <MagicMock name='getpass' id='139984011699392'> @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}") response = requests.get(url) soup = BeautifulSoup(response.content, 'html.parser') content = soup.get_text() > assert 'This\xa0is\xa0a\xa0message3' in content, "Message not found" E AssertionError: Message not found E assert 'This\xa0is\xa0a\xa0message3' in '\n\n\nELOG Login\n\n\n\n\n\n\n\nPlease login\n\n\nUsername\n\n\n\n\nPassword\n\n\n\nKeep me logged in on this computer\nfor the next 31 days or until I log out\n\nForgot password?\n\nELOG V3.1.5-1272bc14\n' tests/test_utils_elog.py:102: AssertionError📌 Teardown phase
duration:
0.00021005608141422272outcome:
passed
↳ Function: test_screenshot
-
❌ Test 5
📌 Setup phase
duration:
0.00013585621491074562outcome:
passed📌 Call phase
duration:
0.027836956083774567outcome:
failedcrash:
path: /workspace/tligui_y/slic/tests/test_utils_elog.py lineno: 151 message: AssertionError: Message not found assert 'SCREENSHOT_INTEGRATION_TEST_MSG_456' in '\n\n\nELOG Login\n\n\n\n\n\n\n\nPlease login\n\n\nUsername\n\n\n\n\nPassword\n\n\n\nKeep me logged in on this computer\nfor the next 31 days or until I log out\n\nForgot password?\n\nELOG V3.1.5-1272bc14\n'traceback:
- path: tests/test_utils_elog.py lineno: 151 message: AssertionErrorlongrepr:
mock_screenshot_class = <MagicMock name='Screenshot' id='139984010777792'> @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) url = "http://localhost:8080/demo/5" response = requests.get(url) print("Texte bruuuut :", response.content) soup = BeautifulSoup(response.content, 'html.parser') content = soup.get_text() print("Texte brut :", content) filename = os.path.basename(fake_path) print("FILE NAME : ", filename) > assert test_msg in content, "Message not found" E AssertionError: Message not found E assert 'SCREENSHOT_INTEGRATION_TEST_MSG_456' in '\n\n\nELOG Login\n\n\n\n\n\n\n\nPlease login\n\n\nUsername\n\n\n\n\nPassword\n\n\n\nKeep me logged in on this computer\nfor the next 31 days or until I log out\n\nForgot password?\n\nELOG V3.1.5-1272bc14\n' tests/test_utils_elog.py:151: AssertionError📌 Teardown phase
duration:
0.0002078711986541748outcome:
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: 47 - nodeid: tests/test_utils_elog.py::test_get_default_elog_with_path_home type: Function lineno: 73 - nodeid: tests/test_utils_elog.py::test_screenshot type: Function lineno: 122 - 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