Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_version_raise(self):
with pytest.raises(InvalidVersion):
check_version('a.1.0.beta0')
with pytest.raises(InvalidVersion):
check_version('3!')
with pytest.raises(InvalidVersion):
check_version((1, 2))
with pytest.raises(NoVersionError):
check_version(None)
assert check_version('4.1.0beta1') == '4.1.0b1'
assert check_version('v1.2') == '1.2'
def test_version_raise(self):
with pytest.raises(InvalidVersion):
check_version('a.1.0.beta0')
with pytest.raises(InvalidVersion):
check_version('3!')
with pytest.raises(InvalidVersion):
check_version((1, 2))
with pytest.raises(NoVersionError):
check_version(None)
assert check_version('4.1.0beta1') == '4.1.0b1'
assert check_version('v1.2') == '1.2'
def test_version_raise(self):
with pytest.raises(InvalidVersion):
check_version('a.1.0.beta0')
with pytest.raises(InvalidVersion):
check_version('3!')
with pytest.raises(InvalidVersion):
check_version((1, 2))
with pytest.raises(NoVersionError):
check_version(None)
assert check_version('4.1.0beta1') == '4.1.0b1'
assert check_version('v1.2') == '1.2'
def test_version_raise(self):
with pytest.raises(InvalidVersion):
check_version('a.1.0.beta0')
with pytest.raises(InvalidVersion):
check_version('3!')
with pytest.raises(InvalidVersion):
check_version((1, 2))
with pytest.raises(NoVersionError):
check_version(None)
assert check_version('4.1.0beta1') == '4.1.0b1'
assert check_version('v1.2') == '1.2'
def test_version_raise(self):
with pytest.raises(InvalidVersion):
check_version('a.1.0.beta0')
with pytest.raises(InvalidVersion):
check_version('3!')
with pytest.raises(InvalidVersion):
check_version((1, 2))
with pytest.raises(NoVersionError):
check_version(None)
assert check_version('4.1.0beta1') == '4.1.0b1'
assert check_version('v1.2') == '1.2'
def test_version_raise(self):
with pytest.raises(InvalidVersion):
check_version('a.1.0.beta0')
with pytest.raises(InvalidVersion):
check_version('3!')
with pytest.raises(InvalidVersion):
check_version((1, 2))
with pytest.raises(NoVersionError):
check_version(None)
assert check_version('4.1.0beta1') == '4.1.0b1'
assert check_version('v1.2') == '1.2'