summaryrefslogtreecommitdiff
path: root/testing/test_runner.py
diff options
context:
space:
mode:
authormarc <Marc>2019-12-14 19:52:17 +0100
committermarc <Marc>2019-12-14 19:52:17 +0100
commitd42f5a41a5ad3ba0888286b38deb4064167fa4a2 (patch)
tree7d15bb39cf3ab4b0e7f6984345b238e46cdd2fa4 /testing/test_runner.py
parenta176ff77bc679db0305abc360434c2ca15e12165 (diff)
downloadpytest-d42f5a41a5ad3ba0888286b38deb4064167fa4a2.tar.gz
delete inspect.getargspect() as is deprecated since Python 3.0
Diffstat (limited to 'testing/test_runner.py')
-rw-r--r--testing/test_runner.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/testing/test_runner.py b/testing/test_runner.py
index 301e11898..df0b7b0cf 100644
--- a/testing/test_runner.py
+++ b/testing/test_runner.py
@@ -468,10 +468,7 @@ reporttypes = [reports.BaseReport, reports.TestReport, reports.CollectReport]
"reporttype", reporttypes, ids=[x.__name__ for x in reporttypes]
)
def test_report_extra_parameters(reporttype):
- if hasattr(inspect, "signature"):
- args = list(inspect.signature(reporttype.__init__).parameters.keys())[1:]
- else:
- args = inspect.getargspec(reporttype.__init__)[0][1:]
+ args = list(inspect.signature(reporttype.__init__).parameters.keys())[1:]
basekw = dict.fromkeys(args, [])
report = reporttype(newthing=1, **basekw)
assert report.newthing == 1