diff --git a/sksurv/__init__.py b/sksurv/__init__.py
index <HASH>..<HASH> 100644
--- a/sksurv/__init__.py
+++ b/sksurv/__init__.py
@@ -2,6 +2,6 @@ from pkg_resources import get_distribution, DistributionNotFound
 
 try:
     __version__ = get_distribution('scikit-survival').version
-except DistributionNotFound:
+except DistributionNotFound:  # pragma: no cover
     # package is not installed
     __version__ = 'unknown'
Exclude unknown __version__ from coverage