Match error message in lineparser test.

This commit is contained in:
Ryan Roden-Corrent 2017-06-29 20:49:05 -04:00
parent c007f592b3
commit 262b028ee9

View File

@ -114,7 +114,8 @@ class TestLineParser:
def test_double_open(self, lineparser):
"""Test if save() bails on an already open file."""
with lineparser._open('r'):
with pytest.raises(IOError):
with pytest.raises(IOError,
match="Refusing to double-open LineParser."):
lineparser.save()
def test_prepare_save(self, tmpdir, lineparser):