Clone
1
run 2140 TEST commit 815b12d
ci-bot edited this page 2025-08-12 13:41:59 +00:00

Test Report

View CI Run 2140 | Commit 815b12d

🧪 Test Report

Generated on 2025-08-12 15:41:36 CEST

🧾 General Info

  • duration: 4.850962162017822
  • root: /workspace/tligui_y/slic
  • environment: {}

📋 Summary

  • Passed: 3
  • Failed: 2
  • Total: 5
  • Collected: 5

🔎 Tests

Passed (3)
  • 📄 test_utils_elog.py

    Function: test_get_default_elog_instance_with_direct_password_and_real_check

    • Test 1

      📌 Setup phase

      duration:

      0.00037876376882195473
      

      outcome:

      passed
      

      📌 Call phase

      duration:

      0.030401958152651787
      

      outcome:

      passed
      

      📌 Teardown phase

      duration:

      0.0002579009160399437
      

      outcome:

      passed
      

    Function: test_get_default_elog_instance_asks_password_and_opens

    • Test 2

      📌 Setup phase

      duration:

      0.00014369981363415718
      

      outcome:

      passed
      

      📌 Call phase

      duration:

      0.014488471206277609
      

      outcome:

      passed
      

      📌 Teardown phase

      duration:

      0.0001517748460173607
      

      outcome:

      passed
      

    Function: test_get_default_elog_with_path_home

    • Test 3

      📌 Setup phase

      duration:

      0.00012623099610209465
      

      outcome:

      passed
      

      📌 Call phase

      duration:

      0.010809045750647783
      

      outcome:

      passed
      

      📌 Teardown phase

      duration:

      0.0001572025939822197
      

      outcome:

      passed
      
Failed (2)
  • 📄 test_utils_elog.py

    Function: test_post

    • Test 4

      📌 Setup phase

      duration:

      0.00012312177568674088
      

      outcome:

      passed
      

      📌 Call phase

      duration:

      0.012643160298466682
      

      outcome:

      failed
      

      crash:

      path: /workspace/tligui_y/slic/tests/test_utils_elog.py
      lineno: 110
      message: AssertionError: Message not found
      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'
      

      traceback:

      -   path: tests/test_utils_elog.py
        lineno: 110
        message: AssertionError
      

      longrepr:

      def test_post():
              elog = get_test_elog()
      
              title = "AUTHOR_OVERRIDE_TEST"
              text = "This is a message"
              author = "robot"
      
              elog.post(text, attributes = {"Author": author})
      
              url = "http://localhost:8080/demo"
              response = requests.get(url)
              html = response.content.decode('iso-8859-1')
              html = unescape(html)
      
      >       assert text in html, "Message not found"
      E       AssertionError: Message not found
      E       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'
      
      tests/test_utils_elog.py:110: AssertionError
      

      📌 Teardown phase

      duration:

      0.00022724783048033714
      

      outcome:

      passed
      

    Function: test_screenshot

    • Test 5

      📌 Setup phase

      duration:

      0.00014363694936037064
      

      outcome:

      passed
      

      📌 Call phase

      duration:

      0.014494413044303656
      

      outcome:

      failed
      

      crash:

      path: /workspace/tligui_y/slic/tests/test_utils_elog.py
      lineno: 136
      message: AssertionError: Attachment 'tmp42hkmt9y.png' not found in post HTML
      assert 'tmp42hkmt9y.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: 136
        message: AssertionError
      

      longrepr:

      mock_screenshot_class = <MagicMock name='Screenshot' id='140286138053872'>
      
          @patch("slic.utils.elog.Screenshot")
          def test_screenshot(mock_screenshot_class):
              with tempfile.NamedTemporaryFile(delete=False, suffix=".png") as tmp:
                  fake_path = tmp.name
                  tmp.write(b"fake image data")
      
              mock_instance = mock_screenshot_class.return_value
              mock_instance.shoot.return_value = [fake_path]
      
              elog = get_test_elog()
      
              test_msg = "SCREENSHOT_INTEGRATION_TEST_MSG_456"
              elog.screenshot(message=test_msg)
      
              url = f"http://localhost:8080/demo"
              response = requests.get(url)
              html = response.content.decode('iso-8859-1')
              html = unescape(html)
      
              filename = os.path.basename(fake_path)
      
              assert test_msg in html, "Message not found"
      >       assert filename in html, f"Attachment '{filename}' not found in post HTML"
      E       AssertionError: Attachment 'tmp42hkmt9y.png' not found in post HTML
      E       assert 'tmp42hkmt9y.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'
      
      tests/test_utils_elog.py:136: AssertionError
      

      📌 Teardown phase

      duration:

      0.00017563579604029655
      

      outcome:

      passed
      

📚 Collected files

(1 tests)
    • Outcome: passed
    • result:
    -   nodeid: tests/test_utils_elog.py
      type: Module
    
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: 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: 113
    

⚠️ 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