Skip to content

Commit bac589d

Browse files
committed
adding richer tests of exception raising
1 parent cc19c07 commit bac589d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/diffpy/labpdfproc/tests/test_tools.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ def test_set_wavelength(inputs, expected):
3030
]
3131

3232

33-
@pytest.mark.parametrize("inputs", params3)
34-
def test_set_wavelength_bad(inputs):
33+
@pytest.mark.parametrize("inputs, msg", params3)
34+
def test_set_wavelength_bad(inputs, msg):
3535
actual_args = argparse.Namespace(wavelength=inputs[0], anode_type=inputs[1])
36-
with pytest.raises(ValueError):
36+
with pytest.raises(ValueError, match=msg[0]):
3737
actual_args.wavelength = set_wavelength(actual_args)

0 commit comments

Comments
 (0)