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_split_ref_exc():
with pytest.raises(ValueError):
util.split_ref('asdf123a')
with pytest.raises(ValueError):
util.split_ref('123asdf')
def test_split_ref():
assert ('net', 20) == util.split_ref('net20')
assert ('net', 20) == util.split_ref('NET20')
assert ('net', 20) == util.split_ref('net 20')
assert ('net', 20) == util.split_ref('net-20')
def test_split_ref():
assert ('net', 20) == util.split_ref('net20')
assert ('net', 20) == util.split_ref('NET20')
assert ('net', 20) == util.split_ref('net 20')
assert ('net', 20) == util.split_ref('net-20')
def test_split_ref():
assert ('net', 20) == util.split_ref('net20')
assert ('net', 20) == util.split_ref('NET20')
assert ('net', 20) == util.split_ref('net 20')
assert ('net', 20) == util.split_ref('net-20')
def test_split_ref():
assert ('net', 20) == util.split_ref('net20')
assert ('net', 20) == util.split_ref('NET20')
assert ('net', 20) == util.split_ref('net 20')
assert ('net', 20) == util.split_ref('net-20')
def test_split_ref_exc():
with pytest.raises(ValueError):
util.split_ref('asdf123a')
with pytest.raises(ValueError):
util.split_ref('123asdf')