From 4242bf62627f90d895f32889da43dda62775a1fa Mon Sep 17 00:00:00 2001 From: Ronny Pfannschmidt Date: Thu, 20 Apr 2017 21:46:58 +0200 Subject: [PATCH] use unknown to specify unknown versions --- _pytest/__init__.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/_pytest/__init__.py b/_pytest/__init__.py index 2599bd05a..df4c53b02 100644 --- a/_pytest/__init__.py +++ b/_pytest/__init__.py @@ -1,7 +1,10 @@ -__all__ = ['__version__'] import pkg_resources +__all__ = ['__version__'] + try: __version__ = pkg_resources.get_distribution('pytest').version except Exception: - __version__ = None # broken installation, we don't even try + # broken installation, we don't even try + # unknown only works because we do poor mans version compare + __version__ = 'unknown'