Module Expr Str Import alias ImportFrom alias ImportFrom alias Assign NameStore Str Assign NameStore Str Assign NameStore ListLoad TupleLoad Num Str TupleLoad Num Str TupleLoad Num Str Assign NameStore ListLoad TupleLoad Num Str Str TupleLoad Num Str Str TupleLoad Num Str Str TupleLoad Num Str Str ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad For NameStore NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Assign NameStore Dict Str Dict Str ListLoad Str Assign NameStore Call AttributeLoad NameLoad attr ListLoad keyword NameLoad Assert CompareEq SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Dict Str ListLoad Dict Str Dict Str Str Dict Str Dict Str Str Assign NameStore ListLoad With Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Str Str NameLoad NameStore body For NameStore NameLoad body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr TupleLoad Call NameLoad NameLoad Call AttributeLoad NameLoad attr Assert CompareEq NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str For NameStore NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Assign NameStore Dict Str Dict Str ListLoad Str Assign NameStore Call AttributeLoad NameLoad attr ListLoad keyword NameLoad Assert CompareEq SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Dict Str Str ListLoad Dict Str Dict Str Str Str NameLoad Dict Str Dict Str Str Str NameLoad Dict Str Dict Str Str Dict Str Dict Str ListLoad Str Str Assign NameStore ListLoad With Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Str Str NameLoad NameStore body For NameStore NameLoad body Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr TupleLoad Call NameLoad NameLoad NameLoad Call AttributeLoad NameLoad attr Assert CompareEq NameLoad Call NameLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Dict Str Dict Str ListLoad Dict Str Dict Str Str Dict Str Dict Str Str Assign NameStore Dict Str Dict Str ListLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad ListLoad NameLoad keyword NameLoad Assign NameStore TupleLoad Str Str Str Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Str Str NameLoad Str Assert CompareEq SubscriptLoad NameLoad Index Num Str Assert CompareEq SubscriptLoad NameLoad Index Num NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Str Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Dict Str Str Dict Str Str ListLoad Dict Str Dict Str Str Str NameLoad Dict Str Dict Str Str Dict Str Dict Str ListLoad Str Dict Str Str ListLoad Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str ListLoad Str Dict Str Str Str Str Str ListLoad Str Assign NameStore Dict Str Dict Str ListLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad Assign NameStore TupleLoad Str Str Str Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Str Str NameLoad Str Assert CompareEq SubscriptLoad NameLoad Index Num Str Assert CompareEq SubscriptLoad NameLoad Index Num Str Assert CompareEq SubscriptLoad NameLoad Index Num NameLoad Assert CompareEq SubscriptLoad NameLoad Index Num Str decorator_list decorator_list
N/A N/A Test loading of data from and into static tables N/A os pyrseas.testutils DatabaseToMapTestCase pyrseas.testutils InputMapToSqlTestCase N/A CREATE_STMT CREATE TABLE t1 (c1 integer, c2 text) N/A FILE_PATH table.t1.data N/A TABLE_DATA N/A N/A 1 abc N/A 2 def N/A 3 ghi N/A TABLE_DATA2 N/A N/A 1 abc row 1 N/A 3 ghi row 2 N/A 2 def row 3 N/A 3 def row 4 StaticTableToMapTestCase N/A DatabaseToMapTestCase N/A N/A Test mapping and copying out of created tables tearDown N/A N/A self N/A N/A N/A N/A N/A self remove_tempfiles N/A test_copy_static_table N/A N/A self N/A N/A N/A Copy a two-column table to a file N/A N/A N/A N/A self db execute CREATE_STMT N/A row TABLE_DATA N/A N/A N/A N/A N/A self db execute INSERT INTO t1 VALUES (%s, %s) row N/A cfg N/A datacopy N/A schema public N/A t1 N/A dbmap N/A N/A self to_map N/A config cfg N/A N/A N/A N/A dbmap N/A schema public N/A table t1 N/A columns N/A N/A c1 N/A type integer N/A c2 N/A type text N/A recs N/A N/A N/A open N/A N/A N/A os path join N/A N/A N/A self cfg N/A files N/A data_path schema.public FILE_PATH f N/A N/A line f N/A N/A N/A c1 c2 N/A N/A line split , N/A N/A N/A recs append N/A N/A int c1 N/A N/A c2 rstrip N/A N/A recs TABLE_DATA N/A test_copy_static_table_pk N/A N/A self N/A N/A N/A Copy a table that has a primary key N/A N/A N/A N/A self db execute CREATE TABLE t1 (c1 integer, c2 char(3), c3 text,PRIMARY KEY (c2, c1)) N/A row TABLE_DATA2 N/A N/A N/A N/A N/A self db execute INSERT INTO t1 VALUES (%s, %s, %s) row N/A cfg N/A datacopy N/A schema public N/A t1 N/A dbmap N/A N/A self to_map N/A config cfg N/A N/A N/A N/A dbmap N/A schema public N/A table t1 N/A columns primary_key N/A N/A c1 N/A type not_null integer True N/A c2 N/A type not_null character(3) True N/A c3 N/A type text N/A t1_pkey N/A columns N/A c2 c1 N/A recs N/A N/A N/A open N/A N/A N/A os path join N/A N/A N/A self cfg N/A files N/A data_path schema.public FILE_PATH f N/A N/A line f N/A N/A N/A c1 c2 c3 N/A N/A line split , N/A N/A N/A recs append N/A N/A int c1 c2 N/A N/A c3 rstrip N/A N/A recs N/A sorted TABLE_DATA2 N/A N/A StaticTableToSqlTestCase N/A InputMapToSqlTestCase N/A N/A Test SQL generation of table load statements test_load_static_table N/A N/A self N/A N/A N/A Truncate and load a two-column table N/A inmap N/A N/A self std_map N/A N/A N/A N/A inmap N/A schema public update N/A table t1 N/A columns N/A N/A c1 N/A type integer N/A c2 N/A type text N/A cfg N/A datacopy N/A schema public N/A t1 N/A sql N/A N/A self to_sql inmap N/A CREATE_STMT config cfg N/A copy_stmt N/A \copy  t1  from ' N/A N/A N/A os path join N/A N/A N/A self cfg N/A files N/A data_path schema.public FILE_PATH ' csv N/A N/A N/A sql N/A 0 TRUNCATE ONLY t1 N/A N/A N/A sql N/A 1 copy_stmt N/A test_load_static_table_fk N/A N/A self N/A N/A N/A Truncate and load a table which has a foreign key dependency N/A stmts N/A CREATE TABLE t1 (pc1 integer PRIMARY KEY, pc2 text) CREATE TABLE t2 (c1 integer, c2 integer REFERENCES t1, c3 text) N/A inmap N/A N/A self std_map N/A N/A N/A N/A inmap N/A schema public update N/A table t1 table t2 N/A columns primary_key N/A N/A pc1 N/A type not_null integer True N/A pc2 N/A type text N/A t1_pkey N/A columns N/A pc1 N/A columns foreign_keys N/A N/A c1 N/A type integer N/A c2 N/A type integer N/A c3 N/A type text N/A t2_c2_fkey N/A columns references N/A c2 N/A schema table columns public t1 N/A pc1 N/A cfg N/A datacopy N/A schema public N/A t1 N/A sql N/A N/A self to_sql inmap stmts config cfg N/A copy_stmt N/A \copy  t1  from ' N/A N/A N/A os path join N/A N/A N/A self cfg N/A files N/A data_path schema.public FILE_PATH ' csv N/A N/A N/A sql N/A 0 ALTER TABLE t2 DROP CONSTRAINT t2_c2_fkey N/A N/A N/A sql N/A 1 TRUNCATE ONLY t1 N/A N/A N/A sql N/A 2 copy_stmt N/A N/A N/A sql N/A 3 ALTER TABLE t2 ADD CONSTRAINT t2_c2_fkey FOREIGN KEY (c2) REFERENCES t1 (pc1) N/A N/A