(self, reproptions: Dict[str, Any])
| 1063 | ], |
| 1064 | ) |
| 1065 | def test_format_excinfo(self, reproptions: Dict[str, Any]) -> None: |
| 1066 | def bar(): |
| 1067 | assert False, "some error" |
| 1068 | |
| 1069 | def foo(): |
| 1070 | bar() |
| 1071 | |
| 1072 | # using inline functions as opposed to importasmod so we get source code lines |
| 1073 | # in the tracebacks (otherwise getinspect doesn't find the source code). |
| 1074 | with pytest.raises(AssertionError) as excinfo: |
| 1075 | foo() |
| 1076 | file = io.StringIO() |
| 1077 | tw = TerminalWriter(file=file) |
| 1078 | repr = excinfo.getrepr(**reproptions) |
| 1079 | repr.toterminal(tw) |
| 1080 | assert file.getvalue() |
| 1081 | |
| 1082 | def test_traceback_repr_style(self, importasmod, tw_mock): |
| 1083 | mod = importasmod( |
nothing calls this directly
no test coverage detected