This module includes helper variables and methods for the
unittests.
|
|
|
|
|
|
|
compare_data(is_array_type,
cls,
rand_data,
ret_data,
method_name,
is_almost)
Compares data type(non-array, 1d or 2d array) |
source code
|
|
|
compare_tuples(cls,
type_params,
rand_tuple,
ret_tuple,
method_name,
is_almost)
Compares tuples that can contain one or more data types |
source code
|
|
|
compare_set_of_tuples(cls,
type_params,
tuple_set1,
tuple_set2,
method_name,
is_almost)
Compares set of tuples that can contain one or more tuples that can
contain one or more data types |
source code
|
|
string @return sql representation of the given type
|
|
string @return sql representation of the given type
|
|
string @return sql representation of the given type
|
|
string @return sql representation of the given type
|
|
string @return sql representation of the given type
|
|
string @return sql representation of the given type
|
|
|
|
|
|
|
|
|
write_rand_data(is_array_type,
b,
rand_data,
elm_size,
elm_type,
pack_fnc)
Writes data(non-array, 1d or 2d array) to the buffer |
source code
|
|
data
|
|
char
|
|
bool
|
|
int2
|
|
int4
|
|
int8
|
|
float4
|
|
float8
|
|
array
|
|
array
|
|
tuple
|
get_vdb_tuple(t,
convert_fnc,
sql_type)
Includes a function(to convert data to sql type) and sql type of data
to the given type param |
source code
|
|
|
enumerate_and_test_tuples(test_fnc,
type_params,
oids,
limit_test)
This method enumerates all subsets of the given types and creates all
combination of different schemas (e.g. |
source code
|
|
|
|
|
|
|
test_tuples_with_data(test_fnc,
limit_test,
sql_interaction)
This method tests tuples with possible non-array and array data type
combinations by calling test_fnc. |
source code
|
|
string
|
|
|
limit_test = 200
|
|
tuple_size = 1000
|
|
test_num = 1000
|
|
vec_size = 100
|
|
row_num = 30
|
|
col_num = 50
|
|
type_non_array = 0
|
|
type_1d_array = 1
|
|
type_2d_array = 2
|
|
with_sql = 1
|
|
without_sql = 0
|
|
size_int = 4
|
|
struct_int4 = struct.Struct('>i')
|
|
temp_table_name = 'temp_tbl_for_test'
|
|
temp_file_name = "temp_file.dat"
|
|
exact_equal = 0
|
|
almost_equal = 1
|
|
almost_eq_places = 6
|
|
enumerate_fnc = lambda x:
|
|
char_type_param = type_non_array, oid_dict [charoid] [data_siz...
|
|
bool_type_param = type_non_array, oid_dict [booloid] [data_siz...
|
|
int2_type_param = type_non_array, oid_dict [int2oid] [data_siz...
|
|
int4_type_param = type_non_array, oid_dict [int4oid] [data_siz...
|
|
int8_type_param = type_non_array, oid_dict [int8oid] [data_siz...
|
|
float4_type_param = type_non_array, oid_dict [float4oid] [data...
|
|
float8_type_param = type_non_array, oid_dict [float8oid] [data...
|
|
char_array_type_param = type_1d_array, oid_dict [charoid] [dat...
|
|
bool_array_type_param = type_1d_array, oid_dict [booloid] [dat...
|
|
int2_array_type_param = type_1d_array, oid_dict [int2oid] [dat...
|
|
int4_array_type_param = type_1d_array, oid_dict [int4oid] [dat...
|
|
int8_array_type_param = type_1d_array, oid_dict [int8oid] [dat...
|
|
float4_array_type_param = type_1d_array, oid_dict [float4oid] ...
|
|
float8_array_type_param = type_1d_array, oid_dict [float8oid] ...
|
|
float8_2d_array_type_param = type_2d_array, oid_dict [float8oi...
|
|
char_vdb_type_param = get_vdb_tuple(char_type_param, convert_c...
|
|
bool_vdb_type_param = get_vdb_tuple(bool_type_param, convert_b...
|
|
int2_vdb_type_param = get_vdb_tuple(int2_type_param, convert_b...
|
|
int4_vdb_type_param = get_vdb_tuple(int4_type_param, convert_b...
|
|
int8_vdb_type_param = get_vdb_tuple(int8_type_param, convert_b...
|
|
float4_vdb_type_param = get_vdb_tuple(float4_type_param, conve...
|
|
float8_vdb_type_param = get_vdb_tuple(float8_type_param, conve...
|
|
bool_array_vdb_type_param = get_vdb_tuple(bool_array_type_para...
|
|
int2_array_vdb_type_param = get_vdb_tuple(int2_array_type_para...
|
|
int4_array_vdb_type_param = get_vdb_tuple(int4_array_type_para...
|
|
int8_array_vdb_type_param = get_vdb_tuple(int8_array_type_para...
|
|
float4_array_vdb_type_param = get_vdb_tuple(float4_array_type_...
|
|
float8_array_vdb_type_param = get_vdb_tuple(float8_array_type_...
|
|
float8_2d_array_vdb_type_param = get_vdb_tuple(float8_2d_array...
|