diff options
author | Ronny Pfannschmidt <ronny.pfannschmidt@redhat.com> | 2017-04-19 20:25:53 +0200 |
---|---|---|
committer | Ronny Pfannschmidt <ronny.pfannschmidt@redhat.com> | 2017-04-19 20:25:53 +0200 |
commit | 2cf422733c0fadb43a707eb6c942425f2cc312a1 (patch) | |
tree | d68e0af0ba4bafe10ad79c7134277edffe23b6d1 /_pytest/__init__.py | |
parent | c0a51f56624fef1b1977a285dcf1d5430e59a94e (diff) | |
download | pytest-2cf422733c0fadb43a707eb6c942425f2cc312a1.tar.gz |
restore linting, drop _pytest._version for check-manifest
Diffstat (limited to '_pytest/__init__.py')
-rw-r--r-- | _pytest/__init__.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/_pytest/__init__.py b/_pytest/__init__.py index a6f201091..2599bd05a 100644 --- a/_pytest/__init__.py +++ b/_pytest/__init__.py @@ -1,5 +1,7 @@ __all__ = ['__version__'] +import pkg_resources + try: - from ._version import version as __version__ -except ImportError: + __version__ = pkg_resources.get_distribution('pytest').version +except Exception: __version__ = None # broken installation, we don't even try |