Files
slic/markdown/pytest-report.json
T
2025-08-12 13:26:15 +00:00

1 line
6.7 KiB
JSON

{"created": 1755005173.504222, "duration": 4.856640338897705, "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": 32}, {"nodeid": "tests/test_utils_elog.py::test_get_default_elog_instance_asks_password_and_opens", "type": "Function", "lineno": 45}, {"nodeid": "tests/test_utils_elog.py::test_get_default_elog_with_path_home", "type": "Function", "lineno": 63}, {"nodeid": "tests/test_utils_elog.py::test_post", "type": "Function", "lineno": 94}, {"nodeid": "tests/test_utils_elog.py::test_screenshot", "type": "Function", "lineno": 111}]}], "tests": [{"nodeid": "tests/test_utils_elog.py::test_get_default_elog_instance_with_direct_password_and_real_check", "lineno": 32, "outcome": "passed", "keywords": ["test_get_default_elog_instance_with_direct_password_and_real_check", "test_utils_elog.py", "tests", "slic", ""], "setup": {"duration": 0.00038144784048199654, "outcome": "passed"}, "call": {"duration": 0.01062604459002614, "outcome": "passed"}, "teardown": {"duration": 0.00023103505373001099, "outcome": "passed"}}, {"nodeid": "tests/test_utils_elog.py::test_get_default_elog_instance_asks_password_and_opens", "lineno": 45, "outcome": "passed", "keywords": ["test_get_default_elog_instance_asks_password_and_opens", "__wrapped__", "patchings", "test_utils_elog.py", "tests", "slic", ""], "setup": {"duration": 0.00012394506484270096, "outcome": "passed"}, "call": {"duration": 0.008876047562807798, "outcome": "passed"}, "teardown": {"duration": 0.00013526901602745056, "outcome": "passed"}}, {"nodeid": "tests/test_utils_elog.py::test_get_default_elog_with_path_home", "lineno": 63, "outcome": "passed", "keywords": ["test_get_default_elog_with_path_home", "__wrapped__", "patchings", "test_utils_elog.py", "tests", "slic", ""], "setup": {"duration": 0.00011932384222745895, "outcome": "passed"}, "call": {"duration": 0.009033511858433485, "outcome": "passed"}, "teardown": {"duration": 0.0001289532519876957, "outcome": "passed"}}, {"nodeid": "tests/test_utils_elog.py::test_post", "lineno": 94, "outcome": "failed", "keywords": ["test_post", "test_utils_elog.py", "tests", "slic", ""], "setup": {"duration": 0.0001158127561211586, "outcome": "passed"}, "call": {"duration": 0.017155563924461603, "outcome": "failed", "crash": {"path": "/workspace/tligui_y/slic/tests/test_utils_elog.py", "lineno": 108, "message": "AssertionError: Message not found\nassert 'This is a message' in '<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\\n<html><head>\\n<META NAME=\"ROBOTS\" CONTENT=\"NOINDEX, ...k\" title=\"Goto ELOG home page\" href=\"http://midas.psi.ch/elog/\">ELOG V2.7.1-2004</a></center></form></body></html>\\r\\n'"}, "traceback": [{"path": "tests/test_utils_elog.py", "lineno": 108, "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 html = response.content.decode('utf-8')\n \n> assert text in html, \"Message not found\"\nE AssertionError: Message not found\nE assert 'This is a message' in '<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\\n<html><head>\\n<META NAME=\"ROBOTS\" CONTENT=\"NOINDEX, ...k\" title=\"Goto ELOG home page\" href=\"http://midas.psi.ch/elog/\">ELOG V2.7.1-2004</a></center></form></body></html>\\r\\n'\n\ntests/test_utils_elog.py:108: AssertionError"}, "teardown": {"duration": 0.00023790821433067322, "outcome": "passed"}}, {"nodeid": "tests/test_utils_elog.py::test_screenshot", "lineno": 111, "outcome": "failed", "keywords": ["test_screenshot", "__wrapped__", "patchings", "test_utils_elog.py", "tests", "slic", ""], "setup": {"duration": 0.00013565970584750175, "outcome": "passed"}, "call": {"duration": 0.01439367001876235, "outcome": "failed", "crash": {"path": "/workspace/tligui_y/slic/tests/test_utils_elog.py", "lineno": 133, "message": "AssertionError: Attachment 'tmp6j29po2g.png' not found in post HTML\nassert 'tmp6j29po2g.png' in '<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\\n<html><head>\\n<META NAME=\"ROBOTS\" CONTENT=\"NOINDEX, ...k\" title=\"Goto ELOG home page\" href=\"http://midas.psi.ch/elog/\">ELOG V2.7.1-2004</a></center></form></body></html>\\r\\n'"}, "traceback": [{"path": "tests/test_utils_elog.py", "lineno": 133, "message": "AssertionError"}], "longrepr": "mock_screenshot_class = <MagicMock name='Screenshot' id='139649836358528'>\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 = f\"http://localhost:8080/demo\"\n response = requests.get(url)\n html = response.content.decode('utf-8')\n \n filename = os.path.basename(fake_path)\n \n assert test_msg in html, \"Message not found\"\n> assert filename in html, f\"Attachment '{filename}' not found in post HTML\"\nE AssertionError: Attachment 'tmp6j29po2g.png' not found in post HTML\nE assert 'tmp6j29po2g.png' in '<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\\n<html><head>\\n<META NAME=\"ROBOTS\" CONTENT=\"NOINDEX, ...k\" title=\"Goto ELOG home page\" href=\"http://midas.psi.ch/elog/\">ELOG V2.7.1-2004</a></center></form></body></html>\\r\\n'\n\ntests/test_utils_elog.py:133: AssertionError"}, "teardown": {"duration": 0.00016342615708708763, "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}]}