1 line
7.1 KiB
JSON
1 line
7.1 KiB
JSON
{"created": 1755007773.0557947, "duration": 5.2050862312316895, "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": 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.0004195990040898323, "outcome": "passed"}, "call": {"duration": 0.01156469201669097, "outcome": "passed"}, "teardown": {"duration": 0.00027003418654203415, "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.0001487969420850277, "outcome": "passed"}, "call": {"duration": 0.015135762747377157, "outcome": "passed"}, "teardown": {"duration": 0.00014798389747738838, "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.0001325458288192749, "outcome": "passed"}, "call": {"duration": 0.009936266113072634, "outcome": "passed"}, "teardown": {"duration": 0.00015523983165621758, "outcome": "passed"}}, {"nodeid": "tests/test_utils_elog.py::test_post", "lineno": 95, "outcome": "failed", "keywords": ["test_post", "test_utils_elog.py", "tests", "slic", ""], "setup": {"duration": 0.00018111709505319595, "outcome": "passed"}, "call": {"duration": 0.047525395173579454, "outcome": "failed", "crash": {"path": "/workspace/tligui_y/slic/tests/test_utils_elog.py", "lineno": 113, "message": "AssertionError: Message not found\nassert 'This is a message' 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...\\n\\xa0\\xa01\\xa0\\xa0\\n\\nTue Aug 12 14:09:31 2025\\nrobot\\xa0\\xa0\\xa0This\\xa0is\\xa0a\\xa0message\\n\\n\\n\\nELOG V2.7.1-2004\\n'"}, "traceback": [{"path": "tests/test_utils_elog.py", "lineno": 113, "message": "AssertionError"}], "longrepr": "def test_post():\n elog = get_test_elog()\n \n title = \"AUTHOR_OVERRIDE_TEST\"\n text = \"This is a message\"\n author = \"robot\"\n \n elog.post(text, attributes = {\"Author\": author})\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> assert text in content, \"Message not found\"\nE AssertionError: Message not found\nE assert 'This is a message' 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...\\n\\xa0\\xa01\\xa0\\xa0\\n\\nTue Aug 12 14:09:31 2025\\nrobot\\xa0\\xa0\\xa0This\\xa0is\\xa0a\\xa0message\\n\\n\\n\\nELOG V2.7.1-2004\\n'\n\ntests/test_utils_elog.py:113: AssertionError"}, "teardown": {"duration": 0.00027146609500050545, "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.0001452649012207985, "outcome": "passed"}, "call": {"duration": 0.04128395486623049, "outcome": "failed", "crash": {"path": "/workspace/tligui_y/slic/tests/test_utils_elog.py", "lineno": 142, "message": "AssertionError: Attachment 'tmpd8a2oesx.png' not found in post HTML\nassert 'tmpd8a2oesx.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:09:32 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='140626790263440'>\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 'tmpd8a2oesx.png' not found in post HTML\nE assert 'tmpd8a2oesx.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:09:32 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.00023767398670315742, "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}]} |