When using pytest, the test adapter will report a blank result (no success or failure) if a test fails and pytest raises an exception when reporting the test failure.
I'm not completely sure what's happening here because when running pytest on the command line, the tests execute fully, and the exception caused by the __repr__
failure is contained within the output:
$ pytest example_tests.py
========================================= test session starts =========================================
platform darwin -- Python 3.6.8, pytest-4.3.0, py-1.8.0, pluggy-0.9.0
Django settings:settings.pytest (from ini file)
rootdir: /Users/yoz/Work, inifile: pytest.ini
plugins: mock-1.10.1, metadata-1.8.0, jest-0.3.0, django-3.4.8, cov-2.6.1
collected 2 items
example_tests.py F. [100%]
============================================== FAILURES ===============================================
___________________________________________ test_the_thing ____________________________________________
def test_the_thing():
t = Thing()
> assert t == 3
E assert <[NotImplementedError("") raised in repr()] Thing object at 0x10d949d30> == 3
example_tests.py:7: AssertionError
================================= 1 failed, 1 passed in 0.24 seconds ==================================