Added unit tests for Spec.__init__ exceptional paths
This commit is contained in:
parent
bf7b861554
commit
462de9847c
1 changed files with 11 additions and 0 deletions
|
@ -707,3 +707,14 @@ def test_constrain_dependency_not_changed(self):
|
||||||
check_constrain_not_changed(
|
check_constrain_not_changed(
|
||||||
'libelf^foo target=' + default_target,
|
'libelf^foo target=' + default_target,
|
||||||
'libelf^foo target=' + default_target)
|
'libelf^foo target=' + default_target)
|
||||||
|
|
||||||
|
def test_exceptional_paths_for_constructor(self):
|
||||||
|
|
||||||
|
with pytest.raises(TypeError):
|
||||||
|
Spec((1, 2))
|
||||||
|
|
||||||
|
with pytest.raises(ValueError):
|
||||||
|
Spec('')
|
||||||
|
|
||||||
|
with pytest.raises(ValueError):
|
||||||
|
Spec('libelf foo')
|
||||||
|
|
Loading…
Reference in a new issue