(pytester: Pytester)
| 1284 | |
| 1285 | |
| 1286 | def test_pytest_assertrepr_compare_integration(pytester: Pytester) -> None: |
| 1287 | pytester.makepyfile( |
| 1288 | """ |
| 1289 | def test_hello(): |
| 1290 | x = set(range(100)) |
| 1291 | y = x.copy() |
| 1292 | y.remove(50) |
| 1293 | assert x == y |
| 1294 | """ |
| 1295 | ) |
| 1296 | result = pytester.runpytest() |
| 1297 | result.stdout.fnmatch_lines( |
| 1298 | [ |
| 1299 | "*def test_hello():*", |
| 1300 | "*assert x == y*", |
| 1301 | "*E*Extra items*left*", |
| 1302 | "*E*50*", |
| 1303 | "*= 1 failed in*", |
| 1304 | ] |
| 1305 | ) |
| 1306 | |
| 1307 | |
| 1308 | def test_sequence_comparison_uses_repr(pytester: Pytester) -> None: |
nothing calls this directly
no test coverage detected