From 03924d205dc083f446cd39b296d42f50b44e7635 Mon Sep 17 00:00:00 2001 From: holger krekel Date: Sun, 31 Oct 2010 18:57:44 +0100 Subject: [PATCH] show pytest.__version__ not pylib --- pytest/plugin/helpconfig.py | 2 +- testing/plugin/test_helpconfig.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/pytest/plugin/helpconfig.py b/pytest/plugin/helpconfig.py index 96e61ff16..1bae3768b 100644 --- a/pytest/plugin/helpconfig.py +++ b/pytest/plugin/helpconfig.py @@ -28,7 +28,7 @@ def pytest_cmdline_main(config): if config.option.version: p = py.path.local(pytest.__file__).dirpath() sys.stderr.write("This is py.test version %s, imported from %s\n" % - (py.__version__, p)) + (pytest.__version__, p)) return 0 elif config.option.help: config.pluginmanager.do_configure(config) diff --git a/testing/plugin/test_helpconfig.py b/testing/plugin/test_helpconfig.py index 5906ccd67..b8c7470d1 100644 --- a/testing/plugin/test_helpconfig.py +++ b/testing/plugin/test_helpconfig.py @@ -1,13 +1,12 @@ -import py, os +import py, pytest,os from pytest.plugin.helpconfig import collectattr def test_version(testdir): - assert py.version == py.__version__ result = testdir.runpytest("--version") assert result.ret == 0 #p = py.path.local(py.__file__).dirpath() result.stderr.fnmatch_lines([ - '*py.test*%s*imported from*' % (py.version, ) + '*py.test*%s*imported from*' % (pytest.__version__, ) ]) def test_help(testdir):