Catch ImportErrors and improve coverage metrics
This commit is contained in:
parent
9dbe8022d9
commit
2fb91a7eaf
2
ddt.py
2
ddt.py
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue