Files
slic/markdown/pytest-report.json
T
2025-08-14 11:12:25 +00:00

1 line
6.7 KiB
JSON

{"created": 1755169943.6094303, "duration": 5.261718988418579, "exitcode": 1, "root": "/workspace/tligui_y/slic", "environment": {}, "summary": {"passed": 3, "failed": 2, "total": 5, "collected": 5}, "collectors": [{"nodeid": "", "outcome": "passed", "result": [{"nodeid": "tests/test_utils_elog.py", "type": "Module"}]}, {"nodeid": "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": 72}, {"nodeid": "tests/test_utils_elog.py::test_screenshot", "type": "Function", "lineno": 121}]}], "tests": [{"nodeid": "tests/test_utils_elog.py::test_get_default_elog_instance_with_direct_password_and_real_check", "lineno": 12, "outcome": "passed", "keywords": ["test_get_default_elog_instance_with_direct_password_and_real_check", "test_utils_elog.py", "tests", "slic", ""], "setup": {"duration": 0.00036542490124702454, "outcome": "passed"}, "call": {"duration": 0.049034155905246735, "outcome": "passed"}, "teardown": {"duration": 0.00035182200372219086, "outcome": "passed"}}, {"nodeid": "tests/test_utils_elog.py::test_get_default_elog_instance_with_wrong_password_and_real_check", "lineno": 37, "outcome": "failed", "keywords": ["test_get_default_elog_instance_with_wrong_password_and_real_check", "test_utils_elog.py", "tests", "slic", ""], "setup": {"duration": 0.00015298090875148773, "outcome": "passed"}, "call": {"duration": 0.008776040282100439, "outcome": "failed", "crash": {"path": "/workspace/tligui_y/slic/tests/test_utils_elog.py", "lineno": 46, "message": "Failed: DID NOT RAISE <class 'elog.logbook_exceptions.LogbookAuthenticationError'>"}, "traceback": [{"path": "tests/test_utils_elog.py", "lineno": 46, "message": "Failed"}], "longrepr": "def test_get_default_elog_instance_with_wrong_password_and_real_check():\n url = \"http://localhost:8080/demo\"\n user = \"robot\"\n wrong_password = \"wrongpassword\"\n \n elog = Elog(url, user=user, password=wrong_password)\n \n with pytest.raises(LogbookAuthenticationError):\n> elog.post(\"This should fail due to wrong password\")\nE Failed: DID NOT RAISE <class 'elog.logbook_exceptions.LogbookAuthenticationError'>\n\ntests/test_utils_elog.py:46: Failed"}, "teardown": {"duration": 0.00023159664124250412, "outcome": "passed"}}, {"nodeid": "tests/test_utils_elog.py::test_get_default_elog_instance_asks_password_and_opens", "lineno": 48, "outcome": "passed", "keywords": ["test_get_default_elog_instance_asks_password_and_opens", "__wrapped__", "patchings", "test_utils_elog.py", "tests", "slic", ""], "setup": {"duration": 0.00015567708760499954, "outcome": "passed"}, "call": {"duration": 0.03952998714521527, "outcome": "passed"}, "teardown": {"duration": 0.00020525837317109108, "outcome": "passed"}}, {"nodeid": "tests/test_utils_elog.py::test_get_default_elog_with_path_home", "lineno": 72, "outcome": "passed", "keywords": ["test_get_default_elog_with_path_home", "__wrapped__", "patchings", "test_utils_elog.py", "tests", "slic", ""], "setup": {"duration": 0.00013842014595866203, "outcome": "passed"}, "call": {"duration": 0.041974322870373726, "outcome": "passed"}, "teardown": {"duration": 0.0001843450590968132, "outcome": "passed"}}, {"nodeid": "tests/test_utils_elog.py::test_screenshot", "lineno": 121, "outcome": "failed", "keywords": ["test_screenshot", "__wrapped__", "patchings", "test_utils_elog.py", "tests", "slic", ""], "setup": {"duration": 0.0001335740089416504, "outcome": "passed"}, "call": {"duration": 0.04509507119655609, "outcome": "failed", "crash": {"path": "/workspace/tligui_y/slic/tests/test_utils_elog.py", "lineno": 151, "message": "AssertionError: Attachment 'fake_screenshot.png' not found in post HTML\nassert 'fake_screenshot.png' in '\\n\\n\\nELOG demo\\n\\n\\n\\n\\n\\n\\n\\n\\n\\ndemo\\n\\n\\n\\xa0\\xa0demo, Page 1 of 1\\xa0\\n\\n\\n\\n\\xa0New\\xa0|\\n\\xa0Find\\xa0|\\n\\xa0Se...05\\xa0\\xa0\\n\\nThu Aug 14 11:12:22 2025\\nrobot\\xa0\\xa0\\xa0SCREENSHOT_INTEGRATION_TEST_MSG_456\\n\\n\\n\\nELOG V2.7.1-2004\\n'"}, "traceback": [{"path": "tests/test_utils_elog.py", "lineno": 151, "message": "AssertionError"}], "longrepr": "mock_screenshot_class = <MagicMock name='Screenshot' id='140605927011952'>\n\n @patch(\"slic.utils.elog.Screenshot\")\n def test_screenshot(mock_screenshot_class):\n fake_path = \"/tmp/fake_screenshot.png\"\n with open(fake_path, \"wb\") as f:\n f.write(b\"fake image data\")\n \n mock_instance = mock_screenshot_class.return_value\n mock_instance.shoot.return_value = [fake_path]\n \n elog = elog = Elog(\"http://localhost:8080/demo\", user=\"robot\", password=\"testpassword\")\n \n test_msg = \"SCREENSHOT_INTEGRATION_TEST_MSG_456\"\n elog.screenshot(message=test_msg)\n \n url = \"http://localhost:8080/demo\"\n response = requests.get(url)\n \n print(\"Texte bruuuut :\", response.content)\n \n soup = BeautifulSoup(response.content, 'html.parser')\n content = soup.get_text()\n \n print(\"Texte brut :\", content)\n \n filename = os.path.basename(fake_path)\n \n print(\"FILE NAME : \", filename)\n \n assert test_msg in content, \"Message not found\"\n> assert filename in content, f\"Attachment '{filename}' not found in post HTML\"\nE AssertionError: Attachment 'fake_screenshot.png' not found in post HTML\nE assert 'fake_screenshot.png' in '\\n\\n\\nELOG demo\\n\\n\\n\\n\\n\\n\\n\\n\\n\\ndemo\\n\\n\\n\\xa0\\xa0demo, Page 1 of 1\\xa0\\n\\n\\n\\n\\xa0New\\xa0|\\n\\xa0Find\\xa0|\\n\\xa0Se...05\\xa0\\xa0\\n\\nThu Aug 14 11:12:22 2025\\nrobot\\xa0\\xa0\\xa0SCREENSHOT_INTEGRATION_TEST_MSG_456\\n\\n\\n\\nELOG V2.7.1-2004\\n'\n\ntests/test_utils_elog.py:151: AssertionError"}, "teardown": {"duration": 0.00023426394909620285, "outcome": "passed"}}], "warnings": [{"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}, {"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}]}