tests/listgen.py
def _sql_func_gen_list_common_code(db_conn, name_proc):
    """Helper function to remove boilerplate in sql function gen list tests."""
    with db_conn, db_conn.cursor() as cursor:
        cursor.callproc(name_proc, ['operator_1'])
        cursor.callproc(name_proc, ['operator_1', -1])
        with pytest.raises(Exception) as ex:
            cursor.callproc(name_proc, ['operator_1', 'a'])
        assert 'invalid input syntax for type bigint: "a"' in str(ex.value)
Helper function to remove boilerplate in sql function gen list tests.
Helper function to remove boilerplate in sql function gen list tests.
Helper function to remove boilerplate in sql function gen list tests .
def _sql_func_gen_list_common_code(db_conn, name_proc):
    with db_conn, db_conn.cursor() as cursor:
        cursor.callproc(name_proc, ['operator_1'])
        cursor.callproc(name_proc, ['operator_1', -1])
        with pytest.raises(Exception) as ex:
            cursor.callproc(name_proc, ['operator_1', 'a'])
        assert 'invalid input syntax for type bigint: "a"' in str(ex.value)
def _sql_func_gen_list_common_code ( db_conn , name_proc ) : with db_conn , db_conn . cursor ( ) as cursor : cursor . callproc ( name_proc , [ 'operator_1' ] ) cursor . callproc ( name_proc , [ 'operator_1' , - 1 ] ) with pytest . raises ( Exception ) as ex : cursor . callproc ( name_proc , [ 'operator_1' , 'a' ] ) assert 'invalid input syntax for type bigint: "a"' in str ( ex . value )
Helper function to remove boilerplate in sql function gen list tests.
Helper function to remove boilerplate in sql function gen list tests .
"""Helper function to remove boilerplate in sql function gen list tests."""
db_conn
name_proc