more robust RuntimeError test; corrected name of double-defined test
This commit is contained in:
parent
9b695fd3fe
commit
5ea5416f37
|
@ -83,7 +83,7 @@ class TestOrientation:
|
||||||
Orientation(family=invalid_family)
|
Orientation(family=invalid_family)
|
||||||
|
|
||||||
@pytest.mark.parametrize('invalid_lattice',[None,'fcc','bcc','hello'])
|
@pytest.mark.parametrize('invalid_lattice',[None,'fcc','bcc','hello'])
|
||||||
def test_invalid_family_init(self,invalid_lattice):
|
def test_invalid_lattice_init(self,invalid_lattice):
|
||||||
with pytest.raises(KeyError):
|
with pytest.raises(KeyError):
|
||||||
Orientation(lattice=invalid_lattice)
|
Orientation(lattice=invalid_lattice)
|
||||||
|
|
||||||
|
|
|
@ -19,9 +19,9 @@ class TestUtil:
|
||||||
out,err = util.execute('sh -c "echo $test_for_execute"',env={'test_for_execute':'test'})
|
out,err = util.execute('sh -c "echo $test_for_execute"',env={'test_for_execute':'test'})
|
||||||
assert out=='test\n' and err==''
|
assert out=='test\n' and err==''
|
||||||
|
|
||||||
def test_execute_invalid(self):
|
def test_execute_runtime_error(self):
|
||||||
with pytest.raises(RuntimeError):
|
with pytest.raises(RuntimeError):
|
||||||
util.execute('/bin/false')
|
util.execute('false')
|
||||||
|
|
||||||
@pytest.mark.parametrize('input,output',
|
@pytest.mark.parametrize('input,output',
|
||||||
[
|
[
|
||||||
|
|
Loading…
Reference in New Issue