more robust RuntimeError test; corrected name of double-defined test

This commit is contained in:
Philip Eisenlohr 2021-08-16 13:40:10 -04:00
parent 9b695fd3fe
commit 5ea5416f37
2 changed files with 3 additions and 3 deletions

View File

@ -83,7 +83,7 @@ class TestOrientation:
Orientation(family=invalid_family)
@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):
Orientation(lattice=invalid_lattice)

View File

@ -19,9 +19,9 @@ class TestUtil:
out,err = util.execute('sh -c "echo $test_for_execute"',env={'test_for_execute':'test'})
assert out=='test\n' and err==''
def test_execute_invalid(self):
def test_execute_runtime_error(self):
with pytest.raises(RuntimeError):
util.execute('/bin/false')
util.execute('false')
@pytest.mark.parametrize('input,output',
[