Clone
1
run 2175 TEST commit 422b908
ci-bot edited this page 2025-08-12 20:44:59 +00:00

Test Report

View CI Run 2175 | Commit 422b908

🧪 Test Report

Generated on 2025-08-12 22:44:37 CEST

🧾 General Info

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

📋 Summary

  • Failed: 1
  • Passed: 1
  • Total: 2
  • Collected: 2

🔎 Tests

Failed (1)
  • 📄 test_utils_sendmail.py

    Function: test_sendmail_local_delivery

    • Test 1

      📌 Setup phase

      duration:

      0.00039944564923644066
      

      outcome:

      passed
      

      📌 Call phase

      duration:

      0.14373651891946793
      

      outcome:

      failed
      

      crash:

      path: /workspace/tligui_y/slic/tests/test_utils_sendmail.py
      lineno: 56
      message: NameError: name 'from_addr' is not defined
      

      traceback:

      -   path: tests/test_utils_sendmail.py
        lineno: 56
        message: NameError
      

      longrepr:

      def test_sendmail_local_delivery():
      
              # Get the current system user
              user = getpass.getuser()
      
              # Define the recipient and email content
              to_addr = f"{user}@localhost"
              subject = "Local sendmail test"
              body = "Hello from pytest/local!"
      
              # Send the email using the function under test
              msg = sendmail(to_addr, from_addr=f"{user}@localhost", subject=subject, body=body)
      
              # Path to the Maildir 'new' folder for this user
              maildir_new = os.path.expanduser("~/Maildir/new")
      
              # Clean up the mail
              for f in glob.glob(os.path.join(maildir_new, "*")):
                  os.remove(f)
      
              # Wait a short time for delivery
              files = []
              for _ in range(50):  # Try for ~5 seconds
                  time.sleep(0.1)
                  files = sorted(glob.glob(os.path.join(maildir_new, "*")))
                  if files:
                      break
      
              # Assert that at least one mail file was delivered
              assert files, f"No email was delivered to {maildir_new}"
      
              # Read the most recent mail file
              with open(files[-1], "r", encoding="utf-8", errors="replace") as f:
                  content = f.read()
      
              # Assert that both the subject and body appear in the delivered email
              assert subject in content, "Email subject not found in delivered message"
              assert body in content, "Email body not found in delivered message"
      
              repr_str = repr(msg)
              assert isinstance(repr_str, str), "__repr__() must return str"
              assert f"To: {to_addr}" in repr_str, "To header missing from __repr__()"
      >       assert f"From: {from_addr}" in repr_str, "From header missing from __repr__()"
      E       NameError: name 'from_addr' is not defined
      
      tests/test_utils_sendmail.py:56: NameError
      

      📌 Teardown phase

      duration:

      0.00039704982191324234
      

      outcome:

      passed
      
Passed (1)
  • 📄 test_utils_sendmail.py

    Function: test_sendmail_raises_on_sendmail_failure

    • Test 2

      📌 Setup phase

      duration:

      0.00048598507419228554
      

      outcome:

      passed
      

      📌 Call phase

      duration:

      0.0009725349955260754
      

      outcome:

      passed
      

      📌 Teardown phase

      duration:

      0.00017899135127663612
      

      outcome:

      passed
      

📚 Collected files

(1 tests)
    • Outcome: passed
    • result:
    -   nodeid: tests/test_utils_sendmail.py
      type: Module
    
tests (1 tests)
  • tests/test_utils_sendmail.py
    • Outcome: passed
    • result:
    -   nodeid: tests/test_utils_sendmail.py::test_sendmail_local_delivery
      type: Function
      lineno: 13
    -   nodeid: tests/test_utils_sendmail.py::test_sendmail_raises_on_sendmail_failure
      type: Function
      lineno: 59
    

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