Table of Contents
Test Report
View CI Run 2293 | Commit a631872
🧪 Test Report
Generated on 2025-08-15 15:53:54 CEST
🧾 General Info
- duration: 5.712953090667725
- root: /workspace/tligui_y/slic
- environment: {}
📋 Summary
- Failed: 4
- Passed: 1
- Total: 5
- Collected: 5
🔎 Tests
❌ Failed (4)
-
📄 test_utils_elog.py
↳ Function: test_get_default_elog_instance_with_direct_password_and_real_check
-
❌ Test 1
📌 Setup phase
duration:
0.00038969237357378006outcome:
passed📌 Call phase
duration:
0.089875019621104outcome:
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.00040605105459690094outcome:
passed
↳ Function: test_get_default_elog_instance_asks_password_and_opens
-
❌ Test 3
📌 Setup phase
duration:
0.00013005314394831657outcome:
passed📌 Call phase
duration:
0.058590006083250046outcome:
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='140636289344560'> mock_getpass = <MagicMock name='getpass' id='140636288256848'> @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.00026060501113533974outcome:
passed
↳ Function: test_get_default_elog_with_path_home
-
❌ Test 4
📌 Setup phase
duration:
0.00014029396697878838outcome:
passed📌 Call phase
duration:
0.05828940821811557outcome:
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='140636288338624'> mock_getuser = <MagicMock name='getuser' id='140636288328704'> mock_getpass = <MagicMock name='getpass' id='140636288303888'> @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.00023041991516947746outcome:
passed
↳ Function: test_screenshot
-
❌ Test 5
📌 Setup phase
duration:
0.00014249514788389206outcome:
passed📌 Call phase
duration:
0.034969132859259844outcome:
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='140636287997408'> @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.00026025623083114624outcome:
passed
-
✅ Passed (1)
-
📄 test_utils_elog.py
↳ Function: test_get_default_elog_instance_with_wrong_password_and_real_check
-
✅ Test 2
📌 Setup phase
duration:
0.00017212191596627235outcome:
passed📌 Call phase
duration:
0.0033593890257179737outcome:
passed📌 Teardown phase
duration:
0.0001567029394209385outcome:
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