Catch ImportErrors and improve coverage metrics

This commit is contained in:
Pradyun S. Gedam 2016-05-30 10:58:03 +05:30
parent 9dbe8022d9
commit 2fb91a7eaf
2 changed files with 2 additions and 2 deletions

2
ddt.py
View File

@ -13,7 +13,7 @@ from functools import wraps
try:
import yaml
except Exception:
except ImportError: # pragma: no cover
_have_yaml = False
else:
_have_yaml = True

View File

@ -4,7 +4,7 @@ from test.mycode import larger_than_two, has_three_elements, is_a_greeting
try:
import yaml
except Exception:
except ImportError: # pragma: no cover
have_yaml_support = False
else:
have_yaml_support = True