2019-06-20 15:12:38 +00:00
|
|
|
"""Version test module."""
|
|
|
|
|
|
|
|
|
|
|
|
def test_version_fails_gracefully(mocker):
|
|
|
|
target = 'pkg_resources.get_distribution'
|
2019-12-04 15:46:01 +00:00
|
|
|
mocker.patch(target, side_effect=Exception())
|
2019-12-04 15:51:11 +00:00
|
|
|
|
2019-12-04 15:46:01 +00:00
|
|
|
from flat_tree.__init__ import __version__
|
2019-12-04 15:51:11 +00:00
|
|
|
|
2019-12-04 15:46:01 +00:00
|
|
|
assert __version__ == 'unknown'
|