Skip to content

Commit

Permalink
Fix pytest-icdiff and ensure icdiff output _not_ used
Browse files Browse the repository at this point in the history
  • Loading branch information
jamescooke committed Jun 24, 2023
1 parent fd9b988 commit da6d91f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pytest_icdiff.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ def pytest_assertrepr_compare(config, op, left, right):
return
except TypeError:
pass
except ValueError:
# ValueErrors are raised when numpy / pandas errors are checked
# Bail out of generating a diff and use pytest default output
return

half_cols = COLS / 2 - MARGINS

Expand Down
1 change: 1 addition & 0 deletions tests/test_pytest_icdiff.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,3 +310,4 @@ def test():
output = result.stdout.str()
assert 'ValueError' not in output
assert 'AssertionError' in output
assert 'where False = all(equals failed' not in output, 'pytest-icdiff not used'

0 comments on commit da6d91f

Please sign in to comment.