Skip to content

Commit

Permalink
issue #230 - another py32 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jantman committed Dec 17, 2016
1 parent 9f22657 commit 3bae5bd
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions awslimitchecker/tests/test_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ def test__get_version_info(self):
assert v.tag == 'foobar'
assert mock_ver.mock_calls == [call('awslimitchecker')]

@pytest.mark.skipif(sys.version_info[0:2] == (3, 2),
reason='versionfinder doesnt work on py32')
def test__get_version_info_fallback(self):
def se(foo):
raise Exception("foo")
Expand All @@ -98,6 +100,17 @@ def se(foo):
' may not be in compliance with the AGPLv3 license:')
]

@pytest.mark.skipif(sys.version_info[0:2] != (3, 2),
reason='py32 versionfinder test')
def test__get_version_info_py32(self):
with patch('awslimitchecker.version.logger') as mock_logger:
with pytest.raises(ImportError):
version._get_version_info()
assert mock_logger.mock_calls == [
call.exception('Error checking installed version; this installation'
' may not be in compliance with the AGPLv3 license:')
]

def test_is_semver(self):
# see:
# https://github.com/mojombo/semver.org/issues/59#issuecomment-57884619
Expand Down

0 comments on commit 3bae5bd

Please sign in to comment.