'Test if _open refuses reentry.'

def test_double_open(self, mocker, lineparser):

    mocker.patch('builtins.open', mock.mock_open())
    with lineparser._open('r'):
        with pytest.raises(IOError, match='Refusing    to    double-open    LineParser.'):
            with lineparser._open('r'):
                pass
