def test_set_context_wrong_args(self):
    '\n        `Connection.set_context` raises `TypeError` if called with a\n        non-`Context` instance argument.\n        '
    ctx = Context(TLSv1_METHOD)
    connection = Connection(ctx, None)
    with pytest.raises(TypeError):
        connection.set_context(object())
    with pytest.raises(TypeError):
        connection.set_context('hello')
    with pytest.raises(TypeError):
        connection.set_context(1)
    assert (ctx is connection.get_context())
`Connection.set_context` raises `TypeError` if called with a
non-`Context` instance argument.
def test_set_context_wrong_args(self):
    '\n        `Connection.set_context` raises `TypeError` if called with a\n        non-`Context` instance argument.\n        '
    ctx = Context(TLSv1_METHOD)
    connection = Connection(ctx, None)
    with pytest.raises(TypeError):
        connection.set_context(object())
    with pytest.raises(TypeError):
        connection.set_context('hello')
    with pytest.raises(TypeError):
        connection.set_context(1)
    assert (ctx is connection.get_context())