more cleanup

jeez, this is getting embarrassing
This commit is contained in:
Daniel Karbach 2016-10-27 15:50:17 +02:00
parent 23a62e952d
commit 6e510372fb
2 changed files with 3 additions and 3 deletions

View File

@ -66,10 +66,10 @@ class TestBaseLineParser:
mocker.patch('builtins.open', mock.mock_open()) mocker.patch('builtins.open', mock.mock_open())
with lineparser._open('r'): with lineparser._open('r'):
with pytest.raises(IOError) as excinfo: with pytest.raises(IOError) as excinf:
with lineparser._open('r'): with lineparser._open('r'):
pass pass
assert str(excinfo.value) == 'Refusing to double-open AppendLineParser.' assert str(excinf.value) == 'Refusing to double-open AppendLineParser.'
def test_binary(self, mocker): def test_binary(self, mocker):
"""Test if _open and _write correctly handle binary files.""" """Test if _open and _write correctly handle binary files."""

View File

@ -79,7 +79,7 @@ def test_debug_trace(mocker):
raise Exception('message') raise Exception('message')
hunter_mock.trace.side_effect = Exception hunter_mock.trace.side_effect = Exception
with pytest.raises(CommandError) as excinfo: with pytest.raises(cmdexc.CommandError) as excinfo:
utilcmds.debug_trace() utilcmds.debug_trace()
assert str(excinfo.value) == 'Exception: message' assert str(excinfo.value) == 'Exception: message'