Clone
1
run 2176 TEST commit 21c4bc9
ci-bot edited this page 2025-08-12 21:00:30 +00:00

Test Report

View CI Run 2176 | Commit 21c4bc9

🧪 Test Report

Generated on 2025-08-12 23:00:07 CEST

🧾 General Info

  • duration: 5.235185146331787
  • 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.00038558803498744965
      

      outcome:

      passed
      

      📌 Call phase

      duration:

      0.14067440014332533
      

      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.00036733411252498627
      

      outcome:

      passed
      
Passed (1)
  • 📄 test_utils_sendmail.py

    Function: test_sendmail_raises_on_sendmail_failure

    • Test 2

      📌 Setup phase

      duration:

      0.0004560472443699837
      

      outcome:

      passed
      

      📌 Call phase

      duration:

      0.0009056129492819309
      

      outcome:

      passed
      

      📌 Teardown phase

      duration:

      0.00018657324835658073
      

      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