Skip to content

Commit a390056

Browse files
brandon-leapyearZac-HD
authored andcommitted
Remove branch for pytest < 3
add_global_property was added in pytest 3, which is probably sufficiently old to drop support pytest-dev/pytest@fa6acdc
1 parent a635935 commit a390056

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

hypothesis-python/src/_hypothesis_pytestplugin.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -301,14 +301,7 @@ def pytest_runtest_makereport(item, call):
301301
# https://github.com/pytest-dev/pytest/issues/7767#issuecomment-1082436256
302302
xml = _stash_get(item.config, xml_key, None)
303303
if xml:
304-
try:
305-
xml.add_global_property(name, stats_base64)
306-
except AttributeError:
307-
# If the pytest version is too old (before add_global_property was
308-
# added), we'll just add to user_properties. This fails xunit2 xml
309-
# schema checks, however, so you should probably upgrade pytest if
310-
# that matters.
311-
report.user_properties.append((name, stats_base64))
304+
xml.add_global_property(name, stats_base64)
312305

313306
# If there's a terminal report, include our summary stats for each test
314307
terminalreporter = item.config.pluginmanager.getplugin("terminalreporter")

0 commit comments

Comments
 (0)