def test_set_session_wrong_args(self):
    '\n        `Connection.set_session` raises `TypeError` if called with an object\n        that is not an instance of `Session`.\n        '
    ctx = Context(TLSv1_METHOD)
    connection = Connection(ctx, None)
    with pytest.raises(TypeError):
        connection.set_session(123)
    with pytest.raises(TypeError):
        connection.set_session('hello')
    with pytest.raises(TypeError):
        connection.set_session(object())
`Connection.set_session` raises `TypeError` if called with an object
that is not an instance of `Session`.
def test_set_session_wrong_args(self):
    '\n        `Connection.set_session` raises `TypeError` if called with an object\n        that is not an instance of `Session`.\n        '
    ctx = Context(TLSv1_METHOD)
    connection = Connection(ctx, None)
    with pytest.raises(TypeError):
        connection.set_session(123)
    with pytest.raises(TypeError):
        connection.set_session('hello')
    with pytest.raises(TypeError):
        connection.set_session(object())