Clone
1
run 2199 TEST commit 6610d1f
ci-bot edited this page 2025-08-14 07:54:10 +00:00

Test Report

View CI Run 2199 | Commit 6610d1f

🧪 Test Report

Generated on 2025-08-14 09:53:44 CEST

🧾 General Info

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

📋 Summary

  • Failed: 6
  • Total: 6
  • Collected: 6

🔎 Tests

Failed (6)
  • 📄 test_utils_elog.py

    Function: test_get_default_elog_instance_with_direct_password_and_real_check

    • Test 1

      📌 Setup phase

      duration:

      0.00035341596230864525
      

      outcome:

      passed
      

      📌 Call phase

      duration:

      0.0034134667366743088
      

      outcome:

      failed
      

      crash:

      path: /workspace/tligui_y/slic/.pixi/envs/default/lib/python3.8/site-packages/elog/__init__.py
      lineno: 13
      message: TypeError: __init__() got an unexpected keyword argument 'auth'
      

      traceback:

      -   path: tests/test_utils_elog.py
        lineno: 44
        message: None
      -   path: .pixi/envs/default/lib/python3.8/site-packages/elog/__init__.py
        lineno: 13
        message: TypeError
      

      longrepr:

      def test_get_default_elog_instance_with_direct_password_and_real_check():
              url = "http://localhost:8080/demo"
              user = "robot"
              password = "testpassword"
      
              elog_instance, returned_user = get_default_elog_instance(url, user=user, password=password)
      
              assert returned_user == user
              assert hasattr(elog_instance, "post")
      
      >       r = elog.open(url, auth=(user, password))
      
      tests/test_utils_elog.py:44: 
      _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
      
      args = ('http://localhost:8080/demo',)
      kwargs = {'auth': ('robot', 'testpassword')}
      
          def open(*args, **kwargs):
              """
              Will return a Logbook object. All arguments are passed to the logbook constructor.
              :param args:
              :param kwargs:
              :return: Logbook() instance
              """
      >       return Logbook(*args, **kwargs)
      E       TypeError: __init__() got an unexpected keyword argument 'auth'
      
      .pixi/envs/default/lib/python3.8/site-packages/elog/__init__.py:13: TypeError
      

      📌 Teardown phase

      duration:

      0.00031912466511130333
      

      outcome:

      passed
      

    Function: test_get_default_elog_instance_asks_password_and_opens

    • Test 2

      📌 Setup phase

      duration:

      0.0001547657884657383
      

      outcome:

      passed
      

      📌 Call phase

      duration:

      0.004207447171211243
      

      outcome:

      failed
      

      crash:

      path: /workspace/tligui_y/slic/.pixi/envs/default/lib/python3.8/site-packages/elog/__init__.py
      lineno: 13
      message: TypeError: __init__() got an unexpected keyword argument 'auth'
      

      traceback:

      -   path: tests/test_utils_elog.py
        lineno: 61
        message: None
      -   path: .pixi/envs/default/lib/python3.8/site-packages/elog/__init__.py
        lineno: 13
        message: TypeError
      

      longrepr:

      mock_home = <MagicMock name='home' id='139776072619632'>
      mock_getpass = <MagicMock name='getpass' id='139776080012480'>
      
          @patch("slic.utils.elog.getpass")
          @patch("slic.utils.elog.Path.home")
          def test_get_default_elog_instance_asks_password_and_opens(mock_home, mock_getpass):
              mock_home.return_value = Path("/does/not/exist")  # Fausse home → lecture échoue
              mock_getpass.return_value = "testpassword"
      
              url = "http://localhost:8080/demo"
              user = "robot"
      
              elog_instance, returned_user = get_default_elog_instance(url, user=user)
      
              assert returned_user == user
              assert hasattr(elog_instance, "post")
      
      >       r = elog.open(url, auth=(user, mock_getpass.return_value))
      
      tests/test_utils_elog.py:61: 
      _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
      
      args = ('http://localhost:8080/demo',)
      kwargs = {'auth': ('robot', 'testpassword')}
      
          def open(*args, **kwargs):
              """
              Will return a Logbook object. All arguments are passed to the logbook constructor.
              :param args:
              :param kwargs:
              :return: Logbook() instance
              """
      >       return Logbook(*args, **kwargs)
      E       TypeError: __init__() got an unexpected keyword argument 'auth'
      
      .pixi/envs/default/lib/python3.8/site-packages/elog/__init__.py:13: TypeError
      

      📌 Teardown phase

      duration:

      0.00021193502470850945
      

      outcome:

      passed
      

    Function: test_get_default_elog_with_path_home

    • Test 3

      📌 Setup phase

      duration:

      0.00013100914657115936
      

      outcome:

      passed
      

      📌 Call phase

      duration:

      0.008598827291280031
      

      outcome:

      failed
      

      crash:

      path: /workspace/tligui_y/slic/.pixi/envs/default/lib/python3.8/site-packages/elog/__init__.py
      lineno: 13
      message: TypeError: __init__() got an unexpected keyword argument 'auth'
      

      traceback:

      -   path: tests/test_utils_elog.py
        lineno: 88
        message: None
      -   path: .pixi/envs/default/lib/python3.8/site-packages/elog/__init__.py
        lineno: 13
        message: TypeError
      

      longrepr:

      mock_home = <MagicMock name='home' id='139776072785056'>
      mock_getuser = <MagicMock name='getuser' id='139776074046672'>
      mock_getpass = <MagicMock name='getpass' id='139776072854400'>
      
          @patch("slic.utils.elog.getpass")
          @patch("slic.utils.elog.getuser")
          @patch("slic.utils.elog.Path.home")
          def test_get_default_elog_with_path_home(mock_home, mock_getuser, mock_getpass):
              fake_user = "robot"
              fake_pw = "testpassword"
              mock_getuser.return_value = fake_user
              mock_getpass.return_value = fake_pw  # fallback safety
      
              tmp_home = Path("/tmp/fake_home_for_robot")
              tmp_home.mkdir(parents=True, exist_ok=True)
              pw_file = tmp_home / ".elog_psi"
              pw_file.write_text(fake_pw)
              mock_home.return_value = tmp_home
      
              url = "http://localhost:8080/demo"
      
              try:
                  elog_instance, returned_user = get_default_elog_instance(url)
      
                  assert returned_user == fake_user
                  assert hasattr(elog_instance, "post")
      
      >           r = elog.open(url, auth=(fake_user, fake_pw))
      
      tests/test_utils_elog.py:88: 
      _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
      
      args = ('http://localhost:8080/demo',)
      kwargs = {'auth': ('robot', 'testpassword')}
      
          def open(*args, **kwargs):
              """
              Will return a Logbook object. All arguments are passed to the logbook constructor.
              :param args:
              :param kwargs:
              :return: Logbook() instance
              """
      >       return Logbook(*args, **kwargs)
      E       TypeError: __init__() got an unexpected keyword argument 'auth'
      
      .pixi/envs/default/lib/python3.8/site-packages/elog/__init__.py:13: TypeError
      

      📌 Teardown phase

      duration:

      0.0001984001137316227
      

      outcome:

      passed
      

    Function: test_get_default_elog_instance_with_wrong_password

    • Test 4

      📌 Setup phase

      duration:

      0.00013608066365122795
      

      outcome:

      passed
      

      📌 Call phase

      duration:

      0.0031822030432522297
      

      outcome:

      failed
      

      crash:

      path: /workspace/tligui_y/slic/.pixi/envs/default/lib/python3.8/site-packages/elog/__init__.py
      lineno: 13
      message: TypeError: __init__() got an unexpected keyword argument 'auth'
      

      traceback:

      -   path: tests/test_utils_elog.py
        lineno: 105
        message: None
      -   path: .pixi/envs/default/lib/python3.8/site-packages/elog/__init__.py
        lineno: 13
        message: TypeError
      

      longrepr:

      def test_get_default_elog_instance_with_wrong_password():
              url = "http://localhost:8080/demo"
              user = "robot"
              wrong_password = "wrongpassword"
      
              elog_instance, returned_user = get_default_elog_instance(url, user=user, password=wrong_password)
      
              assert returned_user == user
              assert hasattr(elog_instance, "post")
      
      >       r = elog.open(url, auth=(user, wrong_password))
      
      tests/test_utils_elog.py:105: 
      _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
      
      args = ('http://localhost:8080/demo',)
      kwargs = {'auth': ('robot', 'wrongpassword')}
      
          def open(*args, **kwargs):
              """
              Will return a Logbook object. All arguments are passed to the logbook constructor.
              :param args:
              :param kwargs:
              :return: Logbook() instance
              """
      >       return Logbook(*args, **kwargs)
      E       TypeError: __init__() got an unexpected keyword argument 'auth'
      
      .pixi/envs/default/lib/python3.8/site-packages/elog/__init__.py:13: TypeError
      

      📌 Teardown phase

      duration:

      0.0001852721907198429
      

      outcome:

      passed
      

    Function: test_post

    • Test 5

      📌 Setup phase

      duration:

      0.00013714376837015152
      

      outcome:

      passed
      

      📌 Call phase

      duration:

      0.015519948676228523
      

      outcome:

      failed
      

      crash:

      path: /workspace/tligui_y/slic/tests/test_utils_elog.py
      lineno: 120
      message: NameError: name 'reponse' is not defined
      

      traceback:

      -   path: tests/test_utils_elog.py
        lineno: 120
        message: NameError
      

      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)
      
      >       print("Texte bruuuut :", reponse.content)
      E       NameError: name 'reponse' is not defined
      
      tests/test_utils_elog.py:120: NameError
      

      📌 Teardown phase

      duration:

      0.00019317585974931717
      

      outcome:

      passed
      

    Function: test_screenshot

    • Test 6

      📌 Setup phase

      duration:

      0.00013254303485155106
      

      outcome:

      passed
      

      📌 Call phase

      duration:

      0.01965351728722453
      

      outcome:

      failed
      

      crash:

      path: /workspace/tligui_y/slic/tests/test_utils_elog.py
      lineno: 148
      message: NameError: name 'reponse' is not defined
      

      traceback:

      -   path: tests/test_utils_elog.py
        lineno: 148
        message: NameError
      

      longrepr:

      mock_screenshot_class = <MagicMock name='Screenshot' id='139776074023360'>
      
          @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 = "http://localhost:8080/demo"
              response = requests.get(url)
      
      >       print("Texte bruuuut :", reponse.content)
      E       NameError: name 'reponse' is not defined
      
      tests/test_utils_elog.py:148: NameError
      

      📌 Teardown phase

      duration:

      0.00021706940606236458
      

      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_get_default_elog_instance_with_wrong_password
      type: Function
      lineno: 94
    -   nodeid: tests/test_utils_elog.py::test_post
      type: Function
      lineno: 107
    -   nodeid: tests/test_utils_elog.py::test_screenshot
      type: Function
      lineno: 130
    

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