Skip to content

Instantly share code, notes, and snippets.

@helloworld
Created December 13, 2022 22:46
Show Gist options
  • Save helloworld/8f890bc4042fbf7058218b6d78174ba3 to your computer and use it in GitHub Desktop.
Save helloworld/8f890bc4042fbf7058218b6d78174ba3 to your computer and use it in GitHub Desktop.

Revisions

  1. helloworld created this gist Dec 13, 2022.
    26 changes: 26 additions & 0 deletions output.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    ============================= test session starts ==============================
    platform linux -- Python 3.10.8, pytest-7.2.0, pluggy-1.0.0 -- /usr/local/bin/python
    cachedir: .pytest_cache
    rootdir: /tmp/tmp4p82sops
    plugins: ddtrace-1.5.2, anyio-3.6.2
    collecting ... collected 4 items

    test.py::test_hello_world PASSED [ 25%]
    test.py::test_hello_world_with_name PASSED [ 50%]
    test.py::test_hello_world_with_name_and_age PASSED [ 75%]
    test.py::test_hello_world_with_name_and_age_over_150_years_old FAILED [100%]

    =================================== FAILURES ===================================
    ____________ test_hello_world_with_name_and_age_over_150_years_old _____________

    def test_hello_world_with_name_and_age_over_150_years_old():
    for age in [150, 151]:
    > assert hello_world('John', age) == 'Hello John! Your age is invalid.'
    E AssertionError: assert 'Hello John! You are 150 years old.' == 'Hello John! Your age is invalid.'
    E - Hello John! Your age is invalid.
    E + Hello John! You are 150 years old.

    test.py:24: AssertionError
    =========================== short test summary info ============================
    FAILED test.py::test_hello_world_with_name_and_age_over_150_years_old - Asser...
    ========================= 1 failed, 3 passed in 0.03s ==========================