From 28edbaace4b5ebad5875d65eb518c29f495212e5 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Thu, 7 Nov 2019 13:05:48 +0100 Subject: [PATCH] showversion: no need for `py.path.local` --- src/_pytest/helpconfig.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/_pytest/helpconfig.py b/src/_pytest/helpconfig.py index 50acc2d7d..21155de2c 100644 --- a/src/_pytest/helpconfig.py +++ b/src/_pytest/helpconfig.py @@ -115,9 +115,10 @@ def pytest_cmdline_parse(): def showversion(config): - p = py.path.local(pytest.__file__) sys.stderr.write( - "This is pytest version {}, imported from {}\n".format(pytest.__version__, p) + "This is pytest version {}, imported from {}\n".format( + pytest.__version__, pytest.__file__ + ) ) plugininfo = getpluginversioninfo(config) if plugininfo: