Skip to content

Commit

Permalink
Implement the test changes from #573
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss committed Jan 9, 2024
1 parent 12a51e4 commit d30e69a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion html5lib/tests/tokenizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,8 @@ def runtest(self):
def repr_failure(self, excinfo):
traceback = excinfo.traceback
ntraceback = traceback.cut(path=__file__)
excinfo.traceback = ntraceback.filter(excinfo)
filter_args = (excinfo,) if pytest.version_tuple >= (7, 4, 0) else ()
excinfo.traceback = ntraceback.filter(*filter_args)

return excinfo.getrepr(funcargs=True,
showlocals=False,
Expand Down
3 changes: 2 additions & 1 deletion html5lib/tests/tree_construction.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ def runtest(self):
def repr_failure(self, excinfo):
traceback = excinfo.traceback
ntraceback = traceback.cut(path=__file__)
excinfo.traceback = ntraceback.filter(excinfo)
filter_args = (excinfo,) if pytest.version_tuple >= (7, 4, 0) else ()
excinfo.traceback = ntraceback.filter(*filter_args)

return excinfo.getrepr(funcargs=True,
showlocals=False,
Expand Down
1 change: 1 addition & 0 deletions requirements-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ coverage>=5.1,<6
pytest-expect>=1.1.0,<2
mock>=3.0.5,<4 ; python_version < '3.6'
mock>=4.0.2,<5 ; python_version >= '3.6'
setuptools; python_version >= '3.12'

0 comments on commit d30e69a

Please sign in to comment.