1 line
5.6 KiB
JSON
1 line
5.6 KiB
JSON
{"created": 1755009214.4270227, "duration": 5.179674386978149, "exitcode": 1, "root": "/workspace/tligui_y/slic", "environment": {}, "summary": {"passed": 4, "failed": 1, "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": 33}, {"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": 64}, {"nodeid": "tests/test_utils_elog.py::test_post", "type": "Function", "lineno": 95}, {"nodeid": "tests/test_utils_elog.py::test_screenshot", "type": "Function", "lineno": 116}]}], "tests": [{"nodeid": "tests/test_utils_elog.py::test_get_default_elog_instance_with_direct_password_and_real_check", "lineno": 33, "outcome": "passed", "keywords": ["test_get_default_elog_instance_with_direct_password_and_real_check", "test_utils_elog.py", "tests", "slic", ""], "setup": {"duration": 0.00038853706791996956, "outcome": "passed"}, "call": {"duration": 0.010808653198182583, "outcome": "passed"}, "teardown": {"duration": 0.00023948820307850838, "outcome": "passed"}}, {"nodeid": "tests/test_utils_elog.py::test_get_default_elog_instance_asks_password_and_opens", "lineno": 46, "outcome": "passed", "keywords": ["test_get_default_elog_instance_asks_password_and_opens", "__wrapped__", "patchings", "test_utils_elog.py", "tests", "slic", ""], "setup": {"duration": 0.00013242103159427643, "outcome": "passed"}, "call": {"duration": 0.014356859028339386, "outcome": "passed"}, "teardown": {"duration": 0.0001435689628124237, "outcome": "passed"}}, {"nodeid": "tests/test_utils_elog.py::test_get_default_elog_with_path_home", "lineno": 64, "outcome": "passed", "keywords": ["test_get_default_elog_with_path_home", "__wrapped__", "patchings", "test_utils_elog.py", "tests", "slic", ""], "setup": {"duration": 0.00012549012899398804, "outcome": "passed"}, "call": {"duration": 0.009339367970824242, "outcome": "passed"}, "teardown": {"duration": 0.00014857668429613113, "outcome": "passed"}}, {"nodeid": "tests/test_utils_elog.py::test_post", "lineno": 95, "outcome": "passed", "keywords": ["test_post", "test_utils_elog.py", "tests", "slic", ""], "setup": {"duration": 0.00012165121734142303, "outcome": "passed"}, "call": {"duration": 0.04465356422588229, "outcome": "passed"}, "teardown": {"duration": 0.00015259999781847, "outcome": "passed"}}, {"nodeid": "tests/test_utils_elog.py::test_screenshot", "lineno": 116, "outcome": "failed", "keywords": ["test_screenshot", "__wrapped__", "patchings", "test_utils_elog.py", "tests", "slic", ""], "setup": {"duration": 0.00013378774747252464, "outcome": "passed"}, "call": {"duration": 0.036294063087552786, "outcome": "failed", "crash": {"path": "/workspace/tligui_y/slic/tests/test_utils_elog.py", "lineno": 142, "message": "AssertionError: Attachment 'tmpygk7ati_.png' not found in post HTML\nassert 'tmpygk7ati_.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...02\\xa0\\xa0\\n\\nTue Aug 12 14:33:33 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": 142, "message": "AssertionError"}], "longrepr": "mock_screenshot_class = <MagicMock name='Screenshot' id='139998405436272'>\n\n @patch(\"slic.utils.elog.Screenshot\")\n def test_screenshot(mock_screenshot_class):\n with tempfile.NamedTemporaryFile(delete=False, suffix=\".png\") as tmp:\n fake_path = tmp.name\n tmp.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 = get_test_elog()\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 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 assert test_msg in content, \"Message not found\"\n> assert filename in content, f\"Attachment '{filename}' not found in post HTML\"\nE AssertionError: Attachment 'tmpygk7ati_.png' not found in post HTML\nE assert 'tmpygk7ati_.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...02\\xa0\\xa0\\n\\nTue Aug 12 14:33:33 2025\\nrobot\\xa0\\xa0\\xa0SCREENSHOT_INTEGRATION_TEST_MSG_456\\n\\n\\n\\nELOG V2.7.1-2004\\n'\n\ntests/test_utils_elog.py:142: AssertionError"}, "teardown": {"duration": 0.00026109907776117325, "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}]} |