@@ -436,7 +436,7 @@ Here is a nice run of several failures and how ``pytest`` presents things:
436436 items = [1, 2, 3]
437437 print("items is {!r}".format(items))
438438 > a, b = items.pop()
439- E TypeError: 'int' object is not iterable
439+ E TypeError: cannot unpack non-iterable int object
440440
441441 failure_demo.py:181: TypeError
442442 --------------------------- Captured stdout call ---------------------------
@@ -516,7 +516,7 @@ Here is a nice run of several failures and how ``pytest`` presents things:
516516 def test_z2_type_error(self):
517517 items = 3
518518 > a, b = items
519- E TypeError: 'int' object is not iterable
519+ E TypeError: cannot unpack non-iterable int object
520520
521521 failure_demo.py:222: TypeError
522522 ______________________ TestMoreErrors.test_startswith ______________________
@@ -650,4 +650,49 @@ Here is a nice run of several failures and how ``pytest`` presents things:
650650 E + where 1 = This is JSON\n{\n 'foo': 'bar'\n}.a
651651
652652 failure_demo.py:282: AssertionError
653+ ========================= short test summary info ==========================
654+ FAILED failure_demo.py::test_generative[3-6] - assert (3 * 2) < 6
655+ FAILED failure_demo.py::TestFailing::test_simple - assert 42 == 43
656+ FAILED failure_demo.py::TestFailing::test_simple_multiline - assert 42 == 54
657+ FAILED failure_demo.py::TestFailing::test_not - assert not 42
658+ FAILED failure_demo.py::TestSpecialisedExplanations::test_eq_text - Asser...
659+ FAILED failure_demo.py::TestSpecialisedExplanations::test_eq_similar_text
660+ FAILED failure_demo.py::TestSpecialisedExplanations::test_eq_multiline_text
661+ FAILED failure_demo.py::TestSpecialisedExplanations::test_eq_long_text - ...
662+ FAILED failure_demo.py::TestSpecialisedExplanations::test_eq_long_text_multiline
663+ FAILED failure_demo.py::TestSpecialisedExplanations::test_eq_list - asser...
664+ FAILED failure_demo.py::TestSpecialisedExplanations::test_eq_list_long - ...
665+ FAILED failure_demo.py::TestSpecialisedExplanations::test_eq_dict - Asser...
666+ FAILED failure_demo.py::TestSpecialisedExplanations::test_eq_set - Assert...
667+ FAILED failure_demo.py::TestSpecialisedExplanations::test_eq_longer_list
668+ FAILED failure_demo.py::TestSpecialisedExplanations::test_in_list - asser...
669+ FAILED failure_demo.py::TestSpecialisedExplanations::test_not_in_text_multiline
670+ FAILED failure_demo.py::TestSpecialisedExplanations::test_not_in_text_single
671+ FAILED failure_demo.py::TestSpecialisedExplanations::test_not_in_text_single_long
672+ FAILED failure_demo.py::TestSpecialisedExplanations::test_not_in_text_single_long_term
673+ FAILED failure_demo.py::TestSpecialisedExplanations::test_eq_dataclass - ...
674+ FAILED failure_demo.py::TestSpecialisedExplanations::test_eq_attrs - Asse...
675+ FAILED failure_demo.py::test_attribute - assert 1 == 2
676+ FAILED failure_demo.py::test_attribute_instance - AssertionError: assert ...
677+ FAILED failure_demo.py::test_attribute_failure - Exception: Failed to get...
678+ FAILED failure_demo.py::test_attribute_multiple - AssertionError: assert ...
679+ FAILED failure_demo.py::TestRaises::test_raises - ValueError: invalid lit...
680+ FAILED failure_demo.py::TestRaises::test_raises_doesnt - Failed: DID NOT ...
681+ FAILED failure_demo.py::TestRaises::test_raise - ValueError: demo error
682+ FAILED failure_demo.py::TestRaises::test_tupleerror - ValueError: not eno...
683+ FAILED failure_demo.py::TestRaises::test_reinterpret_fails_with_print_for_the_fun_of_it
684+ FAILED failure_demo.py::TestRaises::test_some_error - NameError: name 'na...
685+ FAILED failure_demo.py::test_dynamic_compile_shows_nicely - AssertionError
686+ FAILED failure_demo.py::TestMoreErrors::test_complex_error - assert 44 == 43
687+ FAILED failure_demo.py::TestMoreErrors::test_z1_unpack_error - ValueError...
688+ FAILED failure_demo.py::TestMoreErrors::test_z2_type_error - TypeError: c...
689+ FAILED failure_demo.py::TestMoreErrors::test_startswith - AssertionError:...
690+ FAILED failure_demo.py::TestMoreErrors::test_startswith_nested - Assertio...
691+ FAILED failure_demo.py::TestMoreErrors::test_global_func - assert False
692+ FAILED failure_demo.py::TestMoreErrors::test_instance - assert 42 != 42
693+ FAILED failure_demo.py::TestMoreErrors::test_compare - assert 11 < 5
694+ FAILED failure_demo.py::TestMoreErrors::test_try_finally - assert 1 == 0
695+ FAILED failure_demo.py::TestCustomAssertMsg::test_single_line - Assertion...
696+ FAILED failure_demo.py::TestCustomAssertMsg::test_multiline - AssertionEr...
697+ FAILED failure_demo.py::TestCustomAssertMsg::test_custom_repr - Assertion...
653698 ============================ 44 failed in 0.12s ============================
0 commit comments