From 6e510372fb404ebd5d8bbf407a36e9850d87401d Mon Sep 17 00:00:00 2001 From: Daniel Karbach Date: Thu, 27 Oct 2016 15:50:17 +0200 Subject: [PATCH] more cleanup jeez, this is getting embarrassing --- tests/unit/misc/test_lineparser.py | 4 ++-- tests/unit/misc/test_utilcmds.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/unit/misc/test_lineparser.py b/tests/unit/misc/test_lineparser.py index 3ea07a831..f5fbb2f4d 100644 --- a/tests/unit/misc/test_lineparser.py +++ b/tests/unit/misc/test_lineparser.py @@ -66,10 +66,10 @@ class TestBaseLineParser: mocker.patch('builtins.open', mock.mock_open()) with lineparser._open('r'): - with pytest.raises(IOError) as excinfo: + with pytest.raises(IOError) as excinf: with lineparser._open('r'): pass - assert str(excinfo.value) == 'Refusing to double-open AppendLineParser.' + assert str(excinf.value) == 'Refusing to double-open AppendLineParser.' def test_binary(self, mocker): """Test if _open and _write correctly handle binary files.""" diff --git a/tests/unit/misc/test_utilcmds.py b/tests/unit/misc/test_utilcmds.py index 1cdfed2f6..5445f91d2 100644 --- a/tests/unit/misc/test_utilcmds.py +++ b/tests/unit/misc/test_utilcmds.py @@ -79,7 +79,7 @@ def test_debug_trace(mocker): raise Exception('message') hunter_mock.trace.side_effect = Exception - with pytest.raises(CommandError) as excinfo: + with pytest.raises(cmdexc.CommandError) as excinfo: utilcmds.debug_trace() assert str(excinfo.value) == 'Exception: message'