From 5ea5416f37ff431baa8d7f468c8337681f5c9f3b Mon Sep 17 00:00:00 2001 From: Philip Eisenlohr Date: Mon, 16 Aug 2021 13:40:10 -0400 Subject: [PATCH] more robust RuntimeError test; corrected name of double-defined test --- python/tests/test_Orientation.py | 2 +- python/tests/test_util.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/python/tests/test_Orientation.py b/python/tests/test_Orientation.py index b52481519..686ed66c2 100644 --- a/python/tests/test_Orientation.py +++ b/python/tests/test_Orientation.py @@ -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) diff --git a/python/tests/test_util.py b/python/tests/test_util.py index 9af609ad0..13731eda2 100644 --- a/python/tests/test_util.py +++ b/python/tests/test_util.py @@ -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', [