Skip to content

Commit da6d91f

Browse files
committed
Fix pytest-icdiff and ensure icdiff output _not_ used
1 parent fd9b988 commit da6d91f

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

pytest_icdiff.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ def pytest_assertrepr_compare(config, op, left, right):
2323
return
2424
except TypeError:
2525
pass
26+
except ValueError:
27+
# ValueErrors are raised when numpy / pandas errors are checked
28+
# Bail out of generating a diff and use pytest default output
29+
return
2630

2731
half_cols = COLS / 2 - MARGINS
2832

tests/test_pytest_icdiff.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,3 +310,4 @@ def test():
310310
output = result.stdout.str()
311311
assert 'ValueError' not in output
312312
assert 'AssertionError' in output
313+
assert 'where False = all(equals failed' not in output, 'pytest-icdiff not used'

0 commit comments

Comments
 (0)