Module Expr Str ImportFrom alias ImportFrom alias alias Assign NameStore Str Import alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Dict Str Str ListLoad Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str ListLoad Str Str Expr Call AttributeLoad NameLoad attr SubscriptLoad SubscriptLoad NameLoad Index Str Index Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Dict Str Str ListLoad Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str ListLoad Str Str Str Assert CompareEq SubscriptLoad SubscriptLoad NameLoad Index Str Index Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Dict Str Str Str ListLoad Dict Str Dict Str Str Str NameLoad Dict Str Dict Str Str ListLoad Str Dict Str Dict Str Str Str ListLoad Str NameLoad Str Assert CompareEq SubscriptLoad SubscriptLoad NameLoad Index Str Index Str 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 Str ListLoad Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str ListLoad Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert CompareEq Call NameLoad SubscriptLoad NameLoad Index Num Str Assert CompareEq Call NameLoad SubscriptLoad NameLoad Index Num Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Dict 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 Str ListLoad Str Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assert CompareEq Call NameLoad SubscriptLoad NameLoad Index Num Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad 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 Dict Str Dict Str Str ListLoad Str Str Dict Str Str Str ListLoad Dict Str Dict Str Str Str NameLoad Dict Str Dict Str Str Dict Str Dict Str Str Str ListLoad Str Str NameLoad ListLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assert CompareEq Call NameLoad SubscriptLoad NameLoad Index Num Str Assert CompareEq Call NameLoad NameLoad Num decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Dict Str Str ListLoad Dict Str Dict Str Str Str NameLoad Dict Str Dict Str Str Dict Str Dict Str ListLoad Str Assign NameStore 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 Dict Str Str ListLoad Dict Str Dict Str Str Str NameLoad Dict Str Dict Str Str Dict Str Dict Str ListLoad Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert CompareEq SubscriptLoad SubscriptLoad NameLoad Index Str Index Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert CompareEq SubscriptLoad SubscriptLoad NameLoad Index Str Index Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert CompareEq SubscriptLoad SubscriptLoad NameLoad Index Str Index Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert CompareEq SubscriptLoad SubscriptLoad NameLoad Index Str Index Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert CompareEq SubscriptLoad SubscriptLoad NameLoad Index Str Index Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Str Str Assign NameStore Call AttributeLoad NameLoad attr 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 Dict Str Dict Str Str ListLoad Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert CompareEq SubscriptLoad SubscriptLoad SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Index Str Index Str Index Str Str 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 Str ListLoad Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str ListLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert CompareEq Call NameLoad SubscriptLoad NameLoad Index Num Str Assert CompareEq Call NameLoad SubscriptLoad NameLoad Index Num Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Dict 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 Call AttributeLoad NameLoad attr NameLoad NameLoad Assert CompareEq Call NameLoad SubscriptLoad NameLoad Index Num Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Dict Str Dict Str Str ListLoad Dict Str Dict Str Str Str NameLoad Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str ListLoad Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Num Str Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Num Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Dict Str Dict Str Str ListLoad Dict Str Dict Str Str Str NameLoad Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str ListLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Num Str Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Num Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Dict Str Dict Str Str ListLoad Dict Str Dict Str Str Str NameLoad Dict Str Dict Str Str Dict Str Dict Str ListLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Num Str Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Num Str decorator_list AttributeLoad AttributeLoad NameLoad attr attr FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Dict Str Dict Str Str ListLoad Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str Str NameLoad Dict Str Dict Str ListLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Num Str decorator_list AttributeLoad AttributeLoad NameLoad attr attr FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Dict Str Dict Str ListLoad Dict Str Str Dict Str Str Str NameLoad Dict Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assert CompareEq NameLoad ListLoad Str decorator_list 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 Str ListLoad Dict Str Dict Str Str Str NameLoad Dict Str Dict Str Str Dict Str Dict Str Str ListLoad Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert CompareEq SubscriptLoad NameLoad Index Num Str 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 Dict Str Str ListLoad Dict Str Dict Str Str Str NameLoad Dict Str Dict Str Str Dict Str Dict Str ListLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assert CompareEq Call NameLoad SubscriptLoad NameLoad Index Num Str decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Dict Str Str ListLoad Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str Str Str ListLoad Str Str Str Dict Str Str Str Str Str ListLoad Str Assign NameStore Dict Str Str ListLoad Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str ListLoad Str Str Str Dict Str Str Str Str Str ListLoad Str Str Str Assign NameStore Dict Str Str ListLoad Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str ListLoad Str Str Str Dict Str Str Str Str Str ListLoad Str Str Str Assign NameStore Dict Str 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 Str Dict Str Dict Str Str Dict Str Dict Str ListLoad Str Str Dict Str Str Dict Str Str ListLoad Str Str Str Dict Str Str Str Str Str ListLoad Str Str Str Dict Str Str ListLoad Str Dict Str Str Str Str Str ListLoad Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert CompareEq SubscriptLoad SubscriptLoad NameLoad Index Str Index Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert CompareEq SubscriptLoad SubscriptLoad NameLoad Index Str Index Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert CompareEq SubscriptLoad SubscriptLoad NameLoad Index Str Index Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert CompareEq SubscriptLoad SubscriptLoad NameLoad Index Str Index Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Str Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert CompareEq SubscriptLoad SubscriptLoad NameLoad Index Str Index Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Dict Str Str ListLoad Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str Str Str ListLoad Str Str Str Dict Str Str Str Str Str ListLoad Str Assert CompareEq SubscriptLoad SubscriptLoad NameLoad Index Str Index Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Str Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Dict Str Str ListLoad Dict Str Dict Str Str Str NameLoad Dict Str Dict Str Str Dict Str Dict Str ListLoad Str Assign NameStore Dict Str Dict Str Str Str ListLoad Dict Str Dict Str Str Str NameLoad Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str ListLoad Str Dict Str Dict Str Str ListLoad Str Dict Str Str Str Str Str ListLoad Str Assert CompareEq SubscriptLoad SubscriptLoad NameLoad Index Str Index Str NameLoad Assert CompareEq SubscriptLoad NameLoad Index Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Dict Str Str ListLoad Dict Str Dict Str Str Str NameLoad Dict Str Dict Str Str Dict Str Dict Str ListLoad Str Assign NameStore Dict Str Str ListLoad Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Str Dict Str Str ListLoad Str Dict Str Str Str Str Str ListLoad Str Dict Str Str ListLoad Str Dict Str Str Str Str Str ListLoad Str Assert CompareEq SubscriptLoad SubscriptLoad NameLoad Index Str Index Str NameLoad Assert CompareEq SubscriptLoad SubscriptLoad NameLoad Index Str Index Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Str Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore 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 Assert CompareEq SubscriptLoad SubscriptLoad NameLoad Index Str Index Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Index Str Assert UnaryOpNot Call AttributeLoad SubscriptLoad NameLoad Index Str attr Str Assert UnaryOpNot Call AttributeLoad SubscriptLoad NameLoad Index Str attr Str Assert Call AttributeLoad SubscriptLoad NameLoad Index Str attr Str Assert UnaryOpNot Call AttributeLoad SubscriptLoad NameLoad Index Str attr Str Assert Call AttributeLoad SubscriptLoad NameLoad Index Str attr Str Assert Call AttributeLoad SubscriptLoad NameLoad Index Str attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Dict Str Str ListLoad Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str Str ListLoad Str Str Dict Str Str Str Str Str ListLoad Str Assert CompareEq SubscriptLoad SubscriptLoad NameLoad Index Str Index Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Str Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert CompareEq SubscriptLoad SubscriptLoad SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Index Str Index Str Index Str Str 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 Str Dict Str ListLoad Dict Str Dict Str Str Dict Str Dict Str 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 ListLoad Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Num Assign NameStore Num If CompareIn Str SubscriptLoad NameLoad Index Num body Assign NameStore Num Assign NameStore Num Assert CompareEq Call NameLoad SubscriptLoad NameLoad Index NameLoad Str Assert CompareEq Call NameLoad SubscriptLoad NameLoad Index NameLoad Str Assert CompareEq Call NameLoad SubscriptLoad NameLoad Index Num Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Dict Str Str Dict Str ListLoad Dict Str Dict Str Str Dict Str Dict Str 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 Dict Str Dict Str Str Dict Str Str Str Dict Str Str ListLoad Str Dict Str Str ListLoad Str Str Dict Str Str Str ListLoad Str Dict Str Str ListLoad Str Str NameLoad Dict Str Str Str Str ListLoad Str Dict Str Str ListLoad Str Str NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad Slice Num Num Call NameLoad Call NameLoad SubscriptLoad NameLoad Slice Num Num Assign SubscriptStore NameLoad Slice Num Num Call NameLoad Call NameLoad SubscriptLoad NameLoad Slice Num Num Assert CompareEq Call NameLoad SubscriptLoad NameLoad Index Num Str Assert CompareEq Call NameLoad SubscriptLoad NameLoad Index Num Str Assert CompareEq Call NameLoad SubscriptLoad NameLoad Index Num Str Assert CompareEq Call NameLoad SubscriptLoad NameLoad Index Num Str Assert CompareEq Call NameLoad SubscriptLoad NameLoad Index Num Str 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 Str NameLoad Dict Str Dict Str Str Dict Str Dict Str ListLoad Str Str Dict Str Str Str ListLoad Dict Str Dict Str Str Str NameLoad Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str ListLoad Str Dict Str Dict Str Str ListLoad Str Str Dict Str Str ListLoad Str Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Num Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Str 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 Str NameLoad Dict Str Dict Str ListLoad Str Dict Str Str Str ListLoad Dict Str Dict Str Str Str NameLoad Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str ListLoad Str Dict Str Dict Str Str ListLoad Str Dict Str Str ListLoad Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Num Str Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Num Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Str 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 Str NameLoad Dict Str Str Dict Str ListLoad Str Dict Str ListLoad Str Dict Str Str Str ListLoad Dict Str Dict Str Str Str NameLoad Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str ListLoad Str Dict Str Dict Str Str ListLoad Str Dict Str Str ListLoad Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Num Str Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Num Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Str 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 Dict Str Dict Str Str Dict Str Dict Str Str Str NameLoad Dict Str Dict Str ListLoad Str Dict Str Str Str ListLoad Dict Str Dict Str Str Str NameLoad Dict Str Dict Str Str Dict Str Dict Str ListLoad Str Dict Str Dict Str Str ListLoad Str Dict Str Str ListLoad Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Num Str Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Num Str Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Num Str decorator_list AttributeLoad AttributeLoad NameLoad attr attr FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Str 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 ListLoad Str Dict Str Str Str ListLoad Dict Str Dict Str Str Str NameLoad Dict Str Dict Str Str Dict Str Dict Str ListLoad Str Dict Str Dict Str Str Str ListLoad Str Str Dict Str Str ListLoad Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Num Str Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Num Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Str 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 ListLoad Str Dict Str Str Str ListLoad Dict Str Dict Str Str Str NameLoad Dict Str Dict Str Str Dict Str Dict Str ListLoad Str Dict Str Dict Str Str Str ListLoad Str Str Dict Str Str ListLoad Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Num Str Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Num Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Str 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 ListLoad Str Dict Str Str Str ListLoad Dict Str Dict Str Str Str NameLoad Dict Str Dict Str Str Dict Str Dict Str ListLoad Str Dict Str Dict Str Str ListLoad Str Dict Str Str ListLoad Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Num Str Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Num Str 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 Str NameLoad Dict Str Dict Str Str Str NameLoad Dict Str Dict Str Str Dict Str Dict Str ListLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assert CompareEq NameLoad ListLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Dict Str Str Dict Str ListLoad Dict Str Dict Str Str Dict Str Dict Str 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 Str Str ListLoad Str Str Str Dict Str Str ListLoad Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert CompareEq Call NameLoad SubscriptLoad NameLoad Index Num Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad 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 Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str Str ListLoad Str Str Dict Str Str Str Str Str ListLoad Str Dict Str Str ListLoad Dict Str Dict Str Str Str NameLoad Dict Str Dict Str Str Dict Str Dict Str ListLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assert CompareEq Call NameLoad SubscriptLoad NameLoad Index Num Str decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Dict Str Str ListLoad Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str ListLoad Str Assign NameStore Dict Str Str ListLoad Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str ListLoad Str Str Assign NameStore Dict Str Str ListLoad Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str ListLoad Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr ListLoad Str Assert CompareEq SubscriptLoad SubscriptLoad NameLoad Index Str Index Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr SubscriptLoad SubscriptLoad NameLoad Index Str Index Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareLt AttributeLoad AttributeLoad NameLoad attr attr Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Dict Str Dict Str Dict Str ListLoad Str Str Assert CompareEq SubscriptLoad SubscriptLoad NameLoad Index Str Index Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert CompareEq SubscriptLoad SubscriptLoad NameLoad Index Str Index Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert CompareEq SubscriptLoad SubscriptLoad NameLoad Index Str Index Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert CompareEq SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Dict Str Str ListLoad Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str ListLoad Str 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 Str ListLoad Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str ListLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert CompareEq Call NameLoad SubscriptLoad NameLoad Index Num Str Assert CompareEq Call NameLoad SubscriptLoad NameLoad Index Num Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Dict 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 Str ListLoad Str Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assert CompareEq Call NameLoad SubscriptLoad NameLoad Index Num Str 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 Dict Str Str ListLoad Dict Str Dict Str Str Str NameLoad Dict Str Dict Str Str Str NameLoad Dict Str Dict Str Str ListLoad Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Num Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Num Str Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Num Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Dict Str Dict Str ListLoad Dict Str Str Dict Str Str Str NameLoad Dict Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assert CompareEq NameLoad ListLoad Str decorator_list 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 Str ListLoad Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str ListLoad Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert CompareEq SubscriptLoad NameLoad Index Num Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Dict Str Dict Str Str ListLoad Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str ListLoad Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assert CompareEq SubscriptLoad NameLoad Index Num Str 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 Str ListLoad Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str Str ListLoad Str Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert CompareEq Call NameLoad SubscriptLoad NameLoad Index Num Str Assert CompareEq Call NameLoad 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 Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Dict Str Dict Str Str ListLoad Dict Str Dict Str Str Str NameLoad Dict Str Dict Str Str Dict Str Dict Str Str ListLoad Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad ListLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Str Str NameLoad 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 ListLoad Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad ListLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Dict Str Dict Str Str ListLoad Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str ListLoad Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assert CompareEq NameLoad ListLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Str Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Dict Str Dict Str Dict Str Str ListLoad Dict Str Dict Str Str Dict Str Dict Str Str Dict Str Dict Str Str Str ListLoad Str Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assert CompareEq SubscriptLoad NameLoad Index Num Str decorator_list decorator_list If CompareEq NameLoad Str body Expr Call AttributeLoad AttributeLoad NameLoad attr attr
N/A N/A Test constraints pyrseas.testutils DatabaseToMapTestCase pyrseas.testutils InputMapToSqlTestCase fix_indent N/A COMMENT_STMT COMMENT ON CONSTRAINT cns1 ON t1 IS 'Test constraint cns1' N/A pytest CheckConstraintToMapTestCase N/A DatabaseToMapTestCase N/A N/A Test mapping of created CHECK constraints test_check_constraint_1 N/A N/A self N/A N/A N/A Map a table with a CHECK constraint N/A stmts N/A CREATE TABLE t1 (c1 INTEGER, c2 SMALLINT CHECK (c2 < 1000)) N/A dbmap N/A N/A self to_map stmts N/A expmap N/A columns check_constraints N/A N/A c1 N/A type integer N/A c2 N/A type smallint N/A t1_c2_check N/A columns expression N/A c2 (c2 < 1000) N/A N/A N/A self assertEqual N/A N/A dbmap N/A schema public N/A table t1 expmap N/A test_check_constraint_2 N/A N/A self N/A N/A N/A Map a table with a two-column, named CHECK constraint N/A stmts N/A CREATE TABLE t1 (c1 INTEGER, c2 INTEGER, CONSTRAINT t1_check_ratio CHECK (c2 * 100 / c1 <= 50)) N/A dbmap N/A N/A self to_map stmts N/A expmap N/A columns check_constraints N/A N/A c1 N/A type integer N/A c2 N/A type integer N/A t1_check_ratio N/A columns expression N/A c2 c1 (((c2 * 100) / c1) <= 50) N/A N/A N/A N/A dbmap N/A schema public N/A table t1 expmap N/A test_check_constraint_inherited N/A N/A self N/A N/A N/A Map a table with an inherited CHECK constraint N/A stmts N/A CREATE TABLE t1 (c1 INTEGER, CONSTRAINT t1_c1_check CHECK (c1 > 0)) CREATE TABLE t2 (c2 text) INHERITS (t1) N/A dbmap N/A N/A self to_map stmts N/A expmap N/A columns inherits check_constraints N/A N/A c1 N/A type inherited integer True N/A c2 N/A type text N/A t1 N/A t1_c1_check N/A columns inherited expression N/A c1 True (c1 > 0) N/A N/A N/A N/A dbmap N/A schema public N/A table t2 expmap N/A N/A CheckConstraintToSqlTestCase N/A InputMapToSqlTestCase N/A N/A Test SQL generation from input CHECK constraints test_create_w_check_constraint N/A N/A self N/A N/A N/A Create new table with a single column CHECK constraint 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 check_constraints N/A N/A c1 N/A type integer N/A c2 N/A type text N/A t1_c1_check N/A columns expression N/A c1 c1 > 0 and c1 < 1000000 N/A sql N/A N/A self to_sql inmap N/A N/A N/A fix_indent N/A sql N/A 0 CREATE TABLE t1 (c1 integer, c2 text) N/A N/A N/A fix_indent N/A sql N/A 1 ALTER TABLE t1 ADD CONSTRAINT t1_c1_check CHECK (c1 > 0 and c1 < 1000000) N/A test_add_check_constraint N/A N/A self N/A N/A N/A Add a two-column CHECK constraint to an existing table N/A stmts N/A CREATE TABLE t1 (c1 INTEGER NOT NULL, c2 INTEGER NOT NULL, 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 N/A columns check_constraints N/A N/A c1 N/A type not_null integer True N/A c2 N/A type not_null integer True N/A c3 N/A type text N/A t1_check_2_1 N/A columns expression N/A c2 c1 c2 != c1 N/A sql N/A N/A self to_sql inmap stmts N/A N/A N/A fix_indent N/A sql N/A 0 ALTER TABLE t1 ADD CONSTRAINT t1_check_2_1 CHECK (c2 != c1) N/A test_add_check_inherited N/A N/A self N/A N/A N/A Add a table with an inherited CHECK constraint N/A stmts N/A CREATE TABLE t1 (c1 INTEGER, CONSTRAINT t1_c1_check CHECK (c1 > 0)) 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 check_constraints N/A N/A c1 N/A type integer N/A t1_c1_check N/A columns expression N/A c1 c1 > 0 N/A columns check_constraints inherits N/A N/A c1 N/A type inherited integer True N/A c2 N/A type text N/A t1_c1_check N/A columns expression inherited N/A c1 c1 > 0 True N/A t1 N/A sql N/A N/A self to_sql inmap stmts N/A N/A N/A fix_indent N/A sql N/A 0 CREATE TABLE t2 (c2 text) INHERITS (t1) N/A N/A N/A len sql 1 N/A N/A PrimaryKeyToMapTestCase N/A DatabaseToMapTestCase N/A N/A Test mapping of created PRIMARY KEYs N/A map_pkey1 N/A columns primary_key N/A N/A c1 N/A type not_null integer True N/A c2 N/A type text N/A t1_pkey N/A columns N/A c1 N/A map_pkey2 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(5) True N/A c3 N/A type text N/A t1_pkey N/A columns N/A c2 c1 N/A map_pkey3 N/A columns primary_key N/A N/A c1 N/A type not_null integer True N/A c2 N/A type text N/A t1_prim_key N/A columns N/A c1 test_primary_key_1 N/A N/A self N/A N/A N/A Map a table with a single-column primary key N/A stmts N/A CREATE TABLE t1 (c1 INTEGER PRIMARY KEY, c2 TEXT) N/A dbmap N/A N/A self to_map stmts N/A N/A N/A N/A dbmap N/A schema public N/A table t1 N/A self map_pkey1 N/A test_primary_key_2 N/A N/A self N/A N/A N/A Map a table with a single-column primary key, table-level constraint N/A stmts N/A CREATE TABLE t1 (c1 INTEGER, c2 TEXT, PRIMARY KEY (c1)) N/A dbmap N/A N/A self to_map stmts N/A N/A N/A N/A dbmap N/A schema public N/A table t1 N/A self map_pkey1 N/A test_primary_key_3 N/A N/A self N/A N/A N/A Map a table with two-column primary key, atypical order N/A stmts N/A CREATE TABLE t1 (c1 INTEGER, c2 CHAR(5), c3 TEXT, PRIMARY KEY (c2, c1)) N/A dbmap N/A N/A self to_map stmts N/A N/A N/A N/A dbmap N/A schema public N/A table t1 N/A self map_pkey2 N/A test_primary_key_4 N/A N/A self N/A N/A N/A Map a table with a named primary key constraint N/A stmts N/A CREATE TABLE t1 (c1 INTEGER, c2 TEXT, CONSTRAINT t1_prim_key PRIMARY KEY (c1)) N/A dbmap N/A N/A self to_map stmts N/A N/A N/A N/A dbmap N/A schema public N/A table t1 N/A self map_pkey3 N/A test_primary_key_5 N/A N/A self N/A N/A N/A Map a table with a named primary key, column level constraint N/A stmts N/A CREATE TABLE t1 (c1 INTEGER CONSTRAINT t1_prim_key PRIMARY KEY, c2 TEXT) N/A dbmap N/A N/A self to_map stmts N/A N/A N/A N/A dbmap N/A schema public N/A table t1 N/A self map_pkey3 N/A test_primary_key_cluster N/A N/A self N/A N/A N/A Map a table with a primary key and CLUSTER on it N/A stmts N/A CREATE TABLE t1 (c1 integer PRIMARY KEY, c2 text) CLUSTER t1 USING t1_pkey N/A dbmap N/A N/A self to_map stmts 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 text N/A t1_pkey N/A columns cluster N/A c1 True N/A test_map_pk_comment N/A N/A self N/A N/A N/A Map a primary key with a comment N/A stmts N/A CREATE TABLE t1 (c1 integer CONSTRAINT cns1 PRIMARY KEY, c2 text) COMMENT_STMT N/A dbmap N/A N/A self to_map stmts N/A N/A N/A N/A N/A N/A N/A dbmap N/A schema public N/A table t1 N/A primary_key N/A cns1 N/A description Test constraint cns1 N/A N/A PrimaryKeyToSqlTestCase N/A InputMapToSqlTestCase N/A N/A Test SQL generation from input PRIMARY KEYs test_create_with_primary_key N/A N/A self N/A N/A N/A Create new table with single column primary key 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 primary_key N/A N/A c1 N/A type text N/A c2 N/A type integer N/A t1_pkey N/A columns N/A c2 N/A sql N/A N/A self to_sql inmap N/A N/A N/A fix_indent N/A sql N/A 0 CREATE TABLE t1 (c1 text, c2 integer) N/A N/A N/A fix_indent N/A sql N/A 1 ALTER TABLE t1 ADD CONSTRAINT t1_pkey PRIMARY KEY (c2) N/A test_add_primary_key N/A N/A self N/A N/A N/A Add a two-column primary key to an existing table N/A stmts N/A CREATE TABLE t1 (c1 INTEGER NOT NULL, c2 INTEGER NOT NULL, 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 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 integer True N/A c3 N/A type text N/A t1_pkey N/A columns N/A c1 c2 N/A sql N/A N/A self to_sql inmap stmts N/A N/A N/A fix_indent N/A sql N/A 0 ALTER TABLE t1 ADD CONSTRAINT t1_pkey PRIMARY KEY (c1, c2) N/A test_alter_primary_key_add N/A N/A self N/A N/A N/A Add a two-column primary key to an existing table with primary key N/A stmts N/A CREATE TABLE t1 (c1 INTEGER PRIMARY KEY, c2 INTEGER, 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 N/A columns primary_key N/A N/A c1 N/A type not_null integer True N/A c2 N/A type integer N/A c3 N/A type text N/A t1_pkey N/A columns N/A c1 c2 N/A sql N/A N/A self to_sql inmap stmts N/A N/A N/A self assertEqual N/A len sql 2 N/A N/A N/A self assertEqual N/A fix_indent N/A sql N/A 0 ALTER TABLE t1 DROP CONSTRAINT t1_pkey N/A N/A N/A self assertEqual N/A fix_indent N/A sql N/A 1 ALTER TABLE t1 ADD CONSTRAINT t1_pkey PRIMARY KEY (c1, c2) N/A test_alter_primary_key_change N/A N/A self N/A N/A N/A Change primary key N/A stmts N/A CREATE TABLE t1 (c1 INTEGER PRIMARY KEY, c2 INTEGER, 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 N/A columns primary_key N/A N/A c1 N/A type not_null integer True N/A c2 N/A type integer N/A c3 N/A type text N/A t1_pkey N/A columns N/A c2 N/A sql N/A N/A self to_sql inmap stmts N/A N/A N/A self assertEqual N/A len sql 2 N/A N/A N/A self assertEqual N/A fix_indent N/A sql N/A 0 ALTER TABLE t1 DROP CONSTRAINT t1_pkey N/A N/A N/A self assertEqual N/A fix_indent N/A sql N/A 1 ALTER TABLE t1 ADD CONSTRAINT t1_pkey PRIMARY KEY (c2) N/A test_alter_primary_key_change_order N/A N/A self N/A N/A N/A Change primary key N/A stmts N/A CREATE TABLE t1 (c2 INTEGER, c1 INTEGER PRIMARY KEY) 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 primary_key N/A N/A c1 N/A type not_null integer True N/A c2 N/A type integer N/A t1_pkey N/A columns N/A c2 N/A sql N/A N/A self to_sql inmap stmts N/A N/A N/A self assertEqual N/A len sql 2 N/A N/A N/A self assertEqual N/A fix_indent N/A sql N/A 0 ALTER TABLE t1 DROP CONSTRAINT t1_pkey N/A N/A N/A self assertEqual N/A fix_indent N/A sql N/A 1 ALTER TABLE t1 ADD CONSTRAINT t1_pkey PRIMARY KEY (c2) N/A N/A N/A pytest mark xfail test_alter_primary_key_change_order2 N/A N/A self N/A N/A N/A Change primary key N/A stmts N/A CREATE TABLE t1 (c1 INTEGER, c2 INTEGER PRIMARY KEY) 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 primary_key N/A N/A c1 N/A type integer N/A cN N/A type text N/A c2 N/A type not_null integer True N/A t1_pkey N/A columns N/A c2 N/A sql N/A N/A self to_sql inmap stmts N/A N/A N/A self assertEqual N/A len sql 1 N/A N/A N/A self assertEqual N/A fix_indent N/A sql N/A 0 ALTER TABLE t1 ADD COLUMN cN text N/A N/A N/A pytest mark xfail test_drop_primary_key N/A N/A self N/A N/A N/A Drop a primary key on an existing table N/A stmts N/A CREATE TABLE t1 (c1 INTEGER NOT NULL PRIMARY KEY, c2 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 N/A columns N/A N/A c1 c2 N/A type not_null integer True N/A type text N/A sql N/A N/A self to_sql inmap stmts N/A N/A sql N/A ALTER TABLE t1 DROP CONSTRAINT t1_pkey N/A test_primary_key_clustered N/A N/A self N/A N/A N/A Create new table clustered on the primary key 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 primary_key N/A N/A c1 N/A type not_null integer True N/A c2 N/A type text N/A t1_pkey N/A columns cluster N/A c1 True N/A sql N/A N/A self to_sql inmap N/A N/A N/A sql N/A 2 CLUSTER t1 USING t1_pkey N/A test_primary_key_uncluster N/A N/A self N/A N/A N/A Remove cluster from table clustered on the primary key N/A stmts N/A CREATE TABLE t1 (c1 integer PRIMARY KEY, c2 text) CLUSTER t1 USING t1_pkey 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 primary_key N/A N/A c1 N/A type not_null integer True N/A c2 N/A type text N/A t1_pkey N/A columns N/A c1 N/A sql N/A N/A self to_sql inmap stmts N/A N/A N/A fix_indent N/A sql N/A 0 ALTER TABLE t1 SET WITHOUT CLUSTER N/A N/A ForeignKeyToMapTestCase N/A DatabaseToMapTestCase N/A N/A Test mapping of created FOREIGN KEYs N/A map_fkey1 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 t1_c2_fkey N/A columns on_update on_delete references N/A c2 cascade restrict N/A schema table columns public t2 N/A pc1 N/A map_fkey2 N/A columns foreign_keys N/A N/A c1 N/A type integer N/A c2 N/A type character(5) N/A c3 N/A type integer N/A c4 N/A type date N/A c5 N/A type text N/A t1_c2_fkey N/A columns references N/A c2 c3 c4 N/A schema table columns public t2 N/A pc2 pc1 pc3 N/A map_fkey3 N/A columns foreign_keys N/A N/A c1 N/A type integer N/A c2 N/A type character(5) N/A c3 N/A type integer N/A c4 N/A type date N/A c5 N/A type text N/A t1_fgn_key N/A columns references N/A c2 c3 c4 N/A schema table columns public t2 N/A pc2 pc1 pc3 N/A map_fkey4 N/A columns primary_key foreign_keys N/A N/A c1 N/A type not_null integer True N/A c2 N/A type not_null character(5) True N/A c3 N/A type integer N/A c4 N/A type date N/A c5 N/A type text N/A t1_prim_key N/A columns N/A c1 c2 N/A t1_fgn_key1 t1_fgn_key2 N/A columns references N/A c2 c3 c4 N/A schema table columns public t2 N/A pc2 pc1 pc3 N/A columns references N/A c2 N/A schema table columns public t3 N/A qc1 test_foreign_key_1 N/A N/A self N/A N/A N/A Map a table with a single-column foreign key on another table N/A stmts N/A CREATE TABLE t2 (pc1 INTEGER PRIMARY KEY, pc2 TEXT) CREATE TABLE t1 (c1 INTEGER, c2 INTEGER REFERENCES t2 (pc1) ON UPDATE CASCADE ON DELETE RESTRICT, c3 TEXT) N/A dbmap N/A N/A self to_map stmts N/A N/A N/A N/A dbmap N/A schema public N/A table t1 N/A self map_fkey1 N/A test_foreign_key_2 N/A N/A self N/A N/A N/A Map a table with a single-column foreign key, table level constraint N/A stmts N/A CREATE TABLE t2 (pc1 INTEGER PRIMARY KEY, pc2 TEXT) CREATE TABLE t1 (c1 INTEGER, c2 INTEGER, c3 TEXT, FOREIGN KEY (c2) REFERENCES t2 (pc1)ON UPDATE CASCADE ON DELETE RESTRICT) N/A dbmap N/A N/A self to_map stmts N/A N/A N/A N/A dbmap N/A schema public N/A table t1 N/A self map_fkey1 N/A test_foreign_key_3 N/A N/A self N/A N/A N/A Map a table with a three-column foreign key N/A stmts N/A CREATE TABLE t2 (pc1 INTEGER, pc2 CHAR(5), pc3 DATE, pc4 TEXT, PRIMARY KEY (pc2, pc1, pc3)) CREATE TABLE t1 (c1 INTEGER, c2 CHAR(5), c3 INTEGER, c4 DATE, c5 TEXT, FOREIGN KEY (c2, c3, c4) REFERENCES t2 (pc2, pc1, pc3)) N/A dbmap N/A N/A self to_map stmts N/A N/A N/A N/A dbmap N/A schema public N/A table t1 N/A self map_fkey2 N/A test_foreign_key_4 N/A N/A self N/A N/A N/A Map a table with a named, three-column foreign key N/A stmts N/A CREATE TABLE t2 (pc1 INTEGER, pc2 CHAR(5), pc3 DATE, pc4 TEXT, PRIMARY KEY (pc2, pc1, pc3)) CREATE TABLE t1 (c1 INTEGER, c2 CHAR(5), c3 INTEGER, c4 DATE, c5 TEXT, CONSTRAINT t1_fgn_key FOREIGN KEY (c2, c3, c4) REFERENCES t2 (pc2, pc1, pc3)) N/A dbmap N/A N/A self to_map stmts N/A N/A N/A N/A dbmap N/A schema public N/A table t1 N/A self map_fkey3 N/A test_foreign_key_5 N/A N/A self N/A N/A N/A Map a table with a primary key and two foreign keys N/A stmts N/A CREATE TABLE t2 (pc1 INTEGER, pc2 CHAR(5), pc3 DATE, pc4 TEXT, PRIMARY KEY (pc2, pc1, pc3)) CREATE TABLE t3 (qc1 CHAR(5) PRIMARY KEY, qc2 text) CREATE TABLE t1 (c1 INTEGER, c2 CHAR(5), c3 INTEGER, c4 DATE, c5 TEXT, CONSTRAINT t1_prim_key PRIMARY KEY (c1, c2), CONSTRAINT t1_fgn_key1 FOREIGN KEY (c2, c3, c4) REFERENCES t2 (pc2, pc1, pc3), CONSTRAINT t1_fgn_key2 FOREIGN KEY (c2) REFERENCES t3 (qc1)) N/A dbmap N/A N/A self to_map stmts N/A N/A N/A N/A dbmap N/A schema public N/A table t1 N/A self map_fkey4 N/A test_foreign_key_actions N/A N/A self N/A N/A N/A Map a table with foreign key ON UPDATE/ON DELETE actions N/A stmts N/A CREATE TABLE t2 (pc1 INTEGER PRIMARY KEY, pc2 TEXT) CREATE TABLE t1 (c1 INTEGER, c2 INTEGER, c3 TEXT, FOREIGN KEY (c2) REFERENCES t2 (pc1) ON UPDATE RESTRICT ON DELETE SET NULL) N/A dbmap N/A N/A self to_map stmts N/A expmap 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 t1_c2_fkey N/A columns on_update on_delete references N/A c2 restrict set null N/A schema table columns public t2 N/A pc1 N/A N/A N/A N/A dbmap N/A schema public N/A table t1 expmap N/A test_cross_schema_foreign_key N/A N/A self N/A N/A N/A Map a table with a foreign key on a table in another schema N/A stmts N/A CREATE SCHEMA s1 CREATE TABLE t2 (pc1 INTEGER PRIMARY KEY, pc2 TEXT) CREATE TABLE s1.t1 (c1 INTEGER PRIMARY KEY, c2 INTEGER REFERENCES t2 (pc1), c3 TEXT) N/A dbmap N/A N/A self to_map stmts N/A t2map 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 t2_pkey N/A columns N/A pc1 N/A t1map N/A table t1 N/A columns primary_key foreign_keys N/A N/A c1 N/A type not_null integer True N/A c2 N/A type integer N/A c3 N/A type text N/A t1_pkey N/A columns N/A c1 N/A t1_c2_fkey N/A columns references N/A c2 N/A schema table columns public t2 N/A pc1 N/A N/A N/A N/A dbmap N/A schema public N/A table t2 t2map N/A N/A N/A dbmap N/A schema s1 t1map N/A test_multiple_foreign_key N/A N/A self N/A N/A N/A Map a table with its primary key referenced by two others N/A stmts N/A CREATE TABLE t1 (pc1 integer PRIMARY KEY, pc2 text) CREATE TABLE t2 (c1 integer, c2 integer REFERENCES t1 (pc1), c3 text, c4 integer REFERENCES t1 (pc1)) N/A dbmap N/A N/A self to_map stmts N/A t1map 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 t2map 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 c4 N/A type integer N/A t2_c2_fkey t2_c4_fkey N/A columns references N/A c2 N/A schema table columns public t1 N/A pc1 N/A columns references N/A c4 N/A schema table columns public t1 N/A pc1 N/A N/A N/A N/A dbmap N/A schema public N/A table t1 t1map N/A N/A N/A N/A dbmap N/A schema public N/A table t2 t2map N/A test_foreign_key_dropped_column N/A N/A self N/A N/A N/A Map a table with a foreign key after a column has been dropped N/A stmts N/A CREATE TABLE t1 (pc1 integer PRIMARY KEY, pc2 text) CREATE TABLE t2 (c1 integer, c2 text, c3 smallint, c4 integer REFERENCES t1 (pc1)) ALTER TABLE t2 DROP COLUMN c3 N/A dbmap N/A N/A self to_map stmts N/A t2map N/A columns foreign_keys N/A N/A c1 N/A type integer N/A c2 N/A type text N/A c4 N/A type integer N/A t2_c4_fkey N/A columns references N/A c4 N/A schema table columns public t1 N/A pc1 N/A N/A N/A N/A dbmap N/A schema public N/A table t2 t2map N/A test_foreign_key_deferred N/A N/A self N/A N/A N/A Check constraints deferred status N/A stmts N/A CREATE TABLE t2 (pc1 INTEGER PRIMARY KEY, pc2 TEXT) CREATE TABLE t1 (c1 INTEGER, c2 INTEGER REFERENCES t2 (pc1), c3 INTEGER REFERENCES t2 (pc1) DEFERRABLE, c4 INTEGER REFERENCES t2 (pc1) DEFERRABLE INITIALLY DEFERRED) N/A dbmap N/A N/A self to_map stmts N/A fks N/A N/A N/A dbmap N/A schema public N/A table t1 N/A foreign_keys N/A N/A N/A N/A N/A fks N/A t1_c2_fkey get deferrable N/A N/A N/A N/A N/A fks N/A t1_c2_fkey get deferred N/A N/A N/A N/A fks N/A t1_c3_fkey get deferrable N/A N/A N/A N/A N/A fks N/A t1_c3_fkey get deferred N/A N/A N/A N/A fks N/A t1_c4_fkey get deferrable N/A N/A N/A N/A fks N/A t1_c4_fkey get deferred N/A test_foreign_key_match N/A N/A self N/A N/A N/A Map a foreign key constraint with a MATCH specification N/A stmts N/A CREATE TABLE t2 (pc1 INTEGER PRIMARY KEY, pc2 TEXT) CREATE TABLE t1 (c1 INTEGER, c2 INTEGER REFERENCES t2 (pc1) MATCH FULL, c3 TEXT) N/A dbmap N/A N/A self to_map stmts N/A t1map 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 t1_c2_fkey N/A columns match references N/A c2 full N/A schema table columns public t2 N/A pc1 N/A N/A N/A N/A dbmap N/A schema public N/A table t1 t1map N/A test_map_fk_comment N/A N/A self N/A N/A N/A Map a foreign key with a comment N/A stmts N/A CREATE TABLE t2 (pc1 INTEGER PRIMARY KEY, pc2 TEXT) CREATE TABLE t1 (c1 INTEGER, c2 INTEGER CONSTRAINT cns1 REFERENCES t2 (pc1), c3 TEXT) COMMENT_STMT N/A dbmap N/A N/A self to_map stmts N/A N/A N/A N/A N/A N/A N/A dbmap N/A schema public N/A table t1 N/A foreign_keys N/A cns1 N/A description Test constraint cns1 N/A N/A ForeignKeyToSqlTestCase N/A InputMapToSqlTestCase N/A N/A Test SQL generation from input FOREIGN KEYs test_create_with_foreign_key N/A N/A self N/A N/A N/A Create a table with a foreign key constraint 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 N/A N/A c11 N/A type integer N/A c12 N/A type text N/A columns foreign_keys N/A N/A c21 N/A type integer N/A c22 N/A type text N/A c23 N/A type integer N/A t2_c23_fkey N/A columns references N/A c23 N/A columns table N/A c11 t1 N/A sql N/A N/A self to_sql inmap N/A crt1 0 N/A crt2 1 N/A N/A t1 N/A sql N/A 1 N/A N/A crt1 1 N/A crt2 0 N/A N/A N/A fix_indent N/A sql N/A crt1 CREATE TABLE t1 (c11 integer, c12 text) N/A N/A N/A fix_indent N/A sql N/A crt2 CREATE TABLE t2 (c21 integer, c22 text, c23 integer) N/A N/A N/A fix_indent N/A sql N/A 2 ALTER TABLE t2 ADD CONSTRAINT t2_c23_fkey FOREIGN KEY (c23) REFERENCES t1 (c11) N/A test_create_foreign_key_deferred N/A N/A self N/A N/A N/A Create a table with various foreign key deferring constraint 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 N/A N/A c11 N/A type integer N/A c12 N/A type text N/A columns foreign_keys N/A N/A c21 N/A type integer N/A c22 N/A type text N/A c23 N/A type integer N/A c24 N/A type integer N/A c25 N/A type integer N/A t2_c23_fkey t2_c24_fkey t2_c25_fkey N/A columns references N/A c23 N/A columns table N/A c11 t1 N/A columns references deferrable N/A c24 N/A columns table N/A c11 t1 True N/A columns references deferrable deferred N/A c25 N/A columns table N/A c11 t1 True True N/A sql N/A N/A self to_sql inmap N/A N/A sql N/A 0 2 N/A list N/A sorted N/A sql N/A 0 2 N/A N/A sql N/A 2 5 N/A list N/A sorted N/A sql N/A 2 5 N/A N/A N/A fix_indent N/A sql N/A 0 CREATE TABLE t1 (c11 integer, c12 text) N/A N/A N/A fix_indent N/A sql N/A 1 CREATE TABLE t2 (c21 integer, c22 text, c23 integer, c24 integer, c25 integer) N/A N/A N/A fix_indent N/A sql N/A 2 ALTER TABLE t2 ADD CONSTRAINT t2_c23_fkey FOREIGN KEY (c23) REFERENCES t1 (c11) N/A N/A N/A fix_indent N/A sql N/A 3 ALTER TABLE t2 ADD CONSTRAINT t2_c24_fkey FOREIGN KEY (c24) REFERENCES t1 (c11) DEFERRABLE N/A N/A N/A fix_indent N/A sql N/A 4 ALTER TABLE t2 ADD CONSTRAINT t2_c25_fkey FOREIGN KEY (c25) REFERENCES t1 (c11) DEFERRABLE INITIALLY DEFERRED N/A test_add_foreign_key N/A N/A self N/A N/A N/A Add a two-column foreign key to an existing table N/A stmts N/A CREATE TABLE t1 (c11 INTEGER NOT NULL, c12 INTEGER NOT NULL, c13 TEXT, PRIMARY KEY (c11, c12)) CREATE TABLE t2 (c21 INTEGER NOT NULL, c22 TEXT, c23 INTEGER, c24 INTEGER, PRIMARY KEY (c21)) 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 c11 N/A type not_null integer True N/A c12 N/A type not_null integer True N/A c13 N/A type text N/A t1_pkey N/A columns N/A c11 c12 N/A columns primary_key foreign_keys N/A N/A c21 N/A type not_null integer True N/A c22 N/A type text N/A c23 N/A type integer N/A c24 N/A type integer N/A t2_pkey N/A columns N/A c21 N/A t2_c23_fkey N/A columns references N/A c23 c24 N/A columns table N/A c11 c12 t1 N/A sql N/A N/A self to_sql inmap stmts N/A N/A N/A self assertEqual N/A fix_indent N/A sql N/A 0 ALTER TABLE t2 ADD CONSTRAINT t2_c23_fkey FOREIGN KEY (c23, c24) REFERENCES t1 (c11, c12) N/A test_alter_foreign_key1 N/A N/A self N/A N/A N/A Change foreign key: referencing column N/A stmts N/A CREATE TABLE t1 (c11 INTEGER PRIMARY KEY NOT NULL, c12 INTEGER NOT NULL) CREATE TABLE t2 (c21 INTEGER PRIMARY KEY NOT NULL, c22 INTEGER, c23 INTEGER) ALTER TABLE t2 ADD CONSTRAINT t2_c22_fkey FOREIGN KEY (c22) REFERENCES t1 (c11) 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 c11 N/A type not_null integer True N/A c12 N/A type not_null integer True N/A t1_pkey N/A columns N/A c11 N/A columns primary_key foreign_keys N/A N/A c21 N/A type not_null integer True N/A c22 N/A type integer N/A c23 N/A type integer N/A t2_pkey N/A columns N/A c21 N/A t2_c22_fkey N/A columns references N/A c23 N/A columns table N/A c11 t1 N/A sql N/A N/A self to_sql inmap stmts N/A N/A N/A self assertEqual 2 N/A len sql N/A N/A N/A self assertEqual N/A fix_indent N/A sql N/A 0 ALTER TABLE t2 DROP CONSTRAINT t2_c22_fkey N/A N/A N/A self assertEqual N/A fix_indent N/A sql N/A 1 ALTER TABLE t2 ADD CONSTRAINT t2_c22_fkey FOREIGN KEY (c23) REFERENCES t1 (c11) N/A test_alter_foreign_key_columns N/A N/A self N/A N/A N/A Change foreign key: foreign column N/A stmts N/A CREATE TABLE t1 (c11 INTEGER NOT NULL UNIQUE, c12 INTEGER NOT NULL UNIQUE) CREATE TABLE t2 (c21 INTEGER PRIMARY KEY NOT NULL, c22 INTEGER, c23 INTEGER) ALTER TABLE t2 ADD CONSTRAINT t2_c22_fkey FOREIGN KEY (c22) REFERENCES t1 (c11) 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 unique_constraints N/A N/A c11 N/A type not_null integer True N/A c12 N/A type not_null integer True N/A t1_c11_key t1_c12_key N/A columns N/A c11 N/A columns N/A c12 N/A columns primary_key foreign_keys N/A N/A c21 N/A type not_null integer True N/A c22 N/A type integer N/A c23 N/A type integer N/A t2_pkey N/A columns N/A c21 N/A t2_c22_fkey N/A columns references N/A c22 N/A columns table N/A c12 t1 N/A sql N/A N/A self to_sql inmap stmts N/A N/A N/A self assertEqual 2 N/A len sql N/A N/A N/A self assertEqual N/A fix_indent N/A sql N/A 0 ALTER TABLE t2 DROP CONSTRAINT t2_c22_fkey N/A N/A N/A self assertEqual N/A fix_indent N/A sql N/A 1 ALTER TABLE t2 ADD CONSTRAINT t2_c22_fkey FOREIGN KEY (c22) REFERENCES t1 (c12) N/A test_alter_foreign_key_column_order N/A N/A self N/A N/A N/A Change foreign key: foreign column N/A stmts N/A CREATE TABLE t1 (c11 INTEGER, c12 INTEGER PRIMARY KEY) CREATE TABLE t2 (c21 INTEGER PRIMARY KEY, c22 INTEGER) ALTER TABLE t2 ADD CONSTRAINT t2_c22_fkey FOREIGN KEY (c22) REFERENCES t1 (c12) 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 c11 N/A type integer N/A c1N N/A type integer N/A c12 N/A type not_null integer True N/A t1_pkey N/A columns N/A c12 N/A columns primary_key foreign_keys N/A N/A c21 N/A type not_null integer True N/A c22 N/A type integer N/A t2_pkey N/A columns N/A c21 N/A t2_c22_fkey N/A columns references N/A c22 N/A columns table N/A c1N t1 N/A sql N/A N/A self to_sql inmap stmts N/A N/A N/A self assertEqual 2 N/A len sql N/A N/A N/A self assertEqual N/A fix_indent N/A sql N/A 0 ALTER TABLE t1 ADD COLUMN c1N integer N/A N/A N/A self assertEqual N/A fix_indent N/A sql N/A 1 ALTER TABLE t2 DROP CONSTRAINT t2_c22_fkey N/A N/A N/A self assertEqual N/A fix_indent N/A sql N/A 2 ALTER TABLE t2 ADD CONSTRAINT t2_c22_fkey FOREIGN KEY (c22) REFERENCES t1 (c1N) N/A N/A N/A pytest mark xfail test_alter_foreign_key_change_actions N/A N/A self N/A N/A N/A Change foreign key: foreign column N/A stmts N/A CREATE TABLE t1 (c11 INTEGER PRIMARY KEY) CREATE TABLE t2 (c21 INTEGER PRIMARY KEY, c22 INTEGER) ALTER TABLE t2 ADD CONSTRAINT t2_c22_fkey FOREIGN KEY (c22) REFERENCES t1 (c11) ON UPDATE RESTRICT 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 c11 N/A type not_null integer True N/A t1_pkey N/A columns N/A c11 N/A columns primary_key foreign_keys N/A N/A c21 N/A type not_null integer True N/A c22 N/A type integer N/A t2_pkey N/A columns N/A c21 N/A t2_c22_fkey N/A columns on_update references N/A c22 cascade N/A columns table N/A c11 t1 N/A sql N/A N/A self to_sql inmap stmts N/A N/A N/A self assertEqual 2 N/A len sql N/A N/A N/A self assertEqual N/A fix_indent N/A sql N/A 0 ALTER TABLE t2 DROP CONSTRAINT t2_c22_fkey N/A N/A N/A self assertEqual N/A fix_indent N/A sql N/A 1 ALTER TABLE t2 ADD CONSTRAINT t2_c22_fkey FOREIGN KEY (c22) REFERENCES t1 (c11) ON UPDATE CASCADE N/A test_alter_foreign_key_add_actions N/A N/A self N/A N/A N/A Change foreign key: foreign column N/A stmts N/A CREATE TABLE t1 (c11 INTEGER PRIMARY KEY) CREATE TABLE t2 (c21 INTEGER PRIMARY KEY, c22 INTEGER) ALTER TABLE t2 ADD CONSTRAINT t2_c22_fkey FOREIGN KEY (c22) REFERENCES t1 (c11) 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 c11 N/A type not_null integer True N/A t1_pkey N/A columns N/A c11 N/A columns primary_key foreign_keys N/A N/A c21 N/A type not_null integer True N/A c22 N/A type integer N/A t2_pkey N/A columns N/A c21 N/A t2_c22_fkey N/A columns on_update references N/A c22 cascade N/A columns table N/A c11 t1 N/A sql N/A N/A self to_sql inmap stmts N/A N/A N/A self assertEqual 2 N/A len sql N/A N/A N/A self assertEqual N/A fix_indent N/A sql N/A 0 ALTER TABLE t2 DROP CONSTRAINT t2_c22_fkey N/A N/A N/A self assertEqual N/A fix_indent N/A sql N/A 1 ALTER TABLE t2 ADD CONSTRAINT t2_c22_fkey FOREIGN KEY (c22) REFERENCES t1 (c11) ON UPDATE CASCADE N/A test_alter_foreign_key_drop_actions N/A N/A self N/A N/A N/A Change foreign key: foreign column N/A stmts N/A CREATE TABLE t1 (c11 INTEGER PRIMARY KEY) CREATE TABLE t2 (c21 INTEGER PRIMARY KEY, c22 INTEGER) ALTER TABLE t2 ADD CONSTRAINT t2_c22_fkey FOREIGN KEY (c22) REFERENCES t1 (c11) ON UPDATE RESTRICT 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 c11 N/A type not_null integer True N/A t1_pkey N/A columns N/A c11 N/A columns primary_key foreign_keys N/A N/A c21 N/A type not_null integer True N/A c22 N/A type integer N/A t2_pkey N/A columns N/A c21 N/A t2_c22_fkey N/A columns references N/A c22 N/A columns table N/A c11 t1 N/A sql N/A N/A self to_sql inmap stmts N/A N/A N/A self assertEqual 2 N/A len sql N/A N/A N/A self assertEqual N/A fix_indent N/A sql N/A 0 ALTER TABLE t2 DROP CONSTRAINT t2_c22_fkey N/A N/A N/A self assertEqual N/A fix_indent N/A sql N/A 1 ALTER TABLE t2 ADD CONSTRAINT t2_c22_fkey FOREIGN KEY (c22) REFERENCES t1 (c11) N/A test_drop_foreign_key N/A N/A self N/A N/A N/A Drop a foreign key on an existing table N/A stmts N/A CREATE TABLE t1 (c11 INTEGER NOT NULL, c12 TEXT, PRIMARY KEY (c11)) CREATE TABLE t2 (c21 INTEGER NOT NULL PRIMARY KEY, c22 INTEGER NOT NULL REFERENCES t1 (c11), c23 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 c11 N/A type not_null integer True N/A c12 N/A type text N/A t1_pkey N/A columns N/A c11 N/A columns primary_key N/A N/A c21 N/A type not_null integer True N/A c22 N/A type not_null integer True N/A c23 N/A type text N/A t2_pkey N/A columns N/A c21 N/A sql N/A N/A self to_sql inmap stmts N/A N/A sql N/A ALTER TABLE t2 DROP CONSTRAINT t2_c22_fkey N/A test_create_foreign_key_actions N/A N/A self N/A N/A N/A Create a table with foreign key ON UPDATE/ON DELETE actions 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 N/A N/A c11 N/A type integer N/A c12 N/A type text N/A columns foreign_keys N/A N/A c21 N/A type integer N/A c22 N/A type text N/A c23 N/A type integer N/A t2_c23_fkey N/A columns on_update on_delete references N/A c23 cascade set default N/A columns table N/A c11 t1 N/A sql N/A N/A self to_sql inmap N/A N/A N/A fix_indent N/A sql N/A 2 ALTER TABLE t2 ADD CONSTRAINT t2_c23_fkey FOREIGN KEY (c23) REFERENCES t1 (c11) ON UPDATE CASCADE ON DELETE SET DEFAULT N/A test_foreign_key_match N/A N/A self N/A N/A N/A Create a foreign key constraint with a MATCH specification N/A stmts N/A CREATE TABLE t2 (pc1 INTEGER PRIMARY KEY, pc2 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 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 t1_c2_fkey N/A columns match references N/A c2 full N/A schema table columns public t2 N/A pc1 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 t2_pkey N/A columns N/A pc1 N/A sql N/A N/A self to_sql inmap stmts N/A N/A N/A fix_indent N/A sql N/A 1 ALTER TABLE t1 ADD CONSTRAINT t1_c2_fkey FOREIGN KEY (c2) REFERENCES t2 (pc1) MATCH FULL N/A N/A UniqueConstraintToMapTestCase N/A DatabaseToMapTestCase N/A N/A Test mapping of created UNIQUE constraints N/A map_unique1 N/A columns unique_constraints N/A N/A c1 N/A type integer N/A c2 N/A type text N/A t1_c1_key N/A columns N/A c1 N/A map_unique2 N/A columns unique_constraints N/A N/A c1 N/A type integer N/A c2 N/A type character(5) N/A c3 N/A type text N/A t1_c1_c2_key N/A columns N/A c1 c2 N/A map_unique3 N/A columns unique_constraints N/A N/A c1 N/A type integer N/A c2 N/A type text N/A t1_unique_key N/A columns N/A c1 test_unique_1 N/A N/A self N/A N/A N/A Map a table with a single-column unique constraint N/A dbmap N/A N/A self to_map N/A CREATE TABLE t1 (c1 INTEGER UNIQUE, c2 TEXT) N/A N/A N/A N/A dbmap N/A schema public N/A table t1 N/A self map_unique1 N/A test_unique_2 N/A N/A self N/A N/A N/A Map a table with a single-column unique constraint, table level N/A stmts N/A CREATE TABLE t1 (c1 INTEGER, c2 TEXT, UNIQUE (c1)) N/A dbmap N/A N/A self to_map stmts N/A N/A N/A self assertEqual N/A N/A dbmap N/A schema public N/A table t1 N/A self map_unique1 N/A test_unique_3 N/A N/A self N/A N/A N/A Map a table with a two-column unique constraint N/A stmts N/A CREATE TABLE t1 (c1 INTEGER, c2 CHAR(5), c3 TEXT, UNIQUE (c1, c2)) N/A dbmap N/A N/A self to_map stmts N/A N/A N/A N/A self db version 90000 N/A N/A N/A N/A N/A self map_unique2 update N/A unique_constraints N/A t1_c1_key N/A columns N/A c1 c2 N/A N/A N/A N/A dbmap N/A schema public N/A table t1 N/A self map_unique2 N/A test_unique_4 N/A N/A self N/A N/A N/A Map a table with a named unique constraint N/A stmts N/A CREATE TABLE t1 (c1 INTEGER, c2 TEXT, CONSTRAINT t1_unique_key UNIQUE (c1)) N/A dbmap N/A N/A self to_map stmts N/A N/A N/A N/A dbmap N/A schema public N/A table t1 N/A self map_unique3 N/A test_unique_5 N/A N/A self N/A N/A N/A Map a table with a named unique constraint, column level N/A stmts N/A CREATE TABLE t1 ( c1 INTEGER CONSTRAINT t1_unique_key UNIQUE, c2 TEXT) N/A dbmap N/A N/A self to_map stmts N/A N/A N/A N/A dbmap N/A schema public N/A table t1 N/A self map_unique3 N/A test_map_unique_cluster N/A N/A self N/A N/A N/A Map a table with a unique constraint and CLUSTER on it N/A stmts N/A CREATE TABLE t1 (c1 integer, c2 text UNIQUE) CLUSTER t1 USING t1_c2_key N/A dbmap N/A N/A self to_map stmts N/A N/A N/A N/A dbmap N/A schema public N/A table t1 N/A columns unique_constraints N/A N/A c1 N/A type integer N/A c2 N/A type text N/A t1_c2_key N/A columns cluster N/A c2 True N/A N/A UniqueConstraintToSqlTestCase N/A InputMapToSqlTestCase N/A N/A Test SQL generation from input UNIQUE constraints test_create_w_unique_constraint N/A N/A self N/A N/A N/A Create new table with a single column unique constraint 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 unique_constraints N/A N/A c1 N/A type integer N/A c2 N/A type text N/A t1_c1_key N/A columns N/A c1 N/A sql N/A N/A self to_sql inmap N/A N/A N/A fix_indent N/A sql N/A 0 CREATE TABLE t1 (c1 integer, c2 text) N/A N/A N/A fix_indent N/A sql N/A 1 ALTER TABLE t1 ADD CONSTRAINT t1_c1_key UNIQUE (c1) N/A test_add_unique_constraint N/A N/A self N/A N/A N/A Add a two-column unique constraint to an existing table N/A stmts N/A CREATE TABLE t1 (c1 INTEGER NOT NULL, c2 INTEGER NOT NULL, 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 N/A columns unique_constraints N/A N/A c1 N/A type not_null integer True N/A c2 N/A type not_null integer True N/A c3 N/A type text N/A t1_c2_key N/A columns unique N/A c2 c1 True N/A sql N/A N/A self to_sql inmap stmts N/A N/A N/A fix_indent N/A sql N/A 0 ALTER TABLE t1 ADD CONSTRAINT t1_c2_key UNIQUE (c2, c1) N/A test_alter_unique_constraint N/A N/A self N/A N/A N/A Change unique constraint column N/A stmts N/A CREATE TABLE t1 (c1 INTEGER NOT NULL, c2 INTEGER NOT NULL) ALTER TABLE t1 ADD CONSTRAINT t1_ukey UNIQUE (c1) 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 unique_constraints N/A N/A c1 N/A type not_null integer True N/A c2 N/A type not_null integer True N/A t1_ukey N/A columns unique N/A c2 True N/A sql N/A N/A self to_sql inmap stmts N/A N/A N/A self assertEqual 2 N/A len sql N/A N/A N/A self assertEqual N/A fix_indent N/A sql N/A 0 ALTER TABLE t1 DROP CONSTRAINT t1_ukey N/A N/A N/A self assertEqual N/A fix_indent N/A sql N/A 1 ALTER TABLE t1 ADD CONSTRAINT t1_ukey UNIQUE (c2) N/A test_drop_unique_constraint N/A N/A self N/A N/A N/A Drop a unique constraint on an existing table N/A stmts N/A CREATE TABLE t1 (c1 INTEGER NOT NULL UNIQUE, c2 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 N/A columns N/A N/A c1 c2 N/A type not_null integer True N/A type text N/A sql N/A N/A self to_sql inmap stmts N/A N/A sql N/A ALTER TABLE t1 DROP CONSTRAINT t1_c1_key N/A test_create_unique_clustered N/A N/A self N/A N/A N/A Create new table clustered on the unique constraint index 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 unique_constraints N/A N/A c1 N/A type integer N/A c2 N/A type text N/A t1_c1_key N/A columns cluster N/A c1 True N/A sql N/A N/A self to_sql inmap N/A N/A N/A sql N/A 2 CLUSTER t1 USING t1_c1_key N/A test_unique_cluster N/A N/A self N/A N/A N/A Cluster a table on the unique constraint index N/A stmts N/A CREATE TABLE t1 (c1 integer UNIQUE, c2 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 N/A columns unique_constraints N/A N/A c1 N/A type integer N/A c2 N/A type text N/A t1_c1_key N/A columns cluster N/A c1 True N/A sql N/A N/A self to_sql inmap stmts N/A N/A N/A sql N/A 0 CLUSTER t1 USING t1_c1_key N/A N/A ConstraintCommentTestCase N/A InputMapToSqlTestCase N/A N/A Test creation of comments on constraints test_check_constraint_with_comment N/A N/A self N/A N/A N/A Create a CHECK constraint with a comment 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 check_constraints N/A N/A c1 N/A type integer N/A c2 N/A type text N/A cns1 N/A columns expression description N/A c1 c1 > 50 Test constraint cns1 N/A sql N/A N/A self to_sql inmap N/A N/A N/A fix_indent N/A sql N/A 0 CREATE TABLE t1 (c1 integer, c2 text) N/A N/A N/A fix_indent N/A sql N/A 1 ALTER TABLE t1 ADD CONSTRAINT cns1 CHECK (c1 > 50) N/A N/A N/A sql N/A 2 COMMENT_STMT N/A test_comment_on_primary_key N/A N/A self N/A N/A N/A Create a comment for an existing primary key N/A stmts N/A CREATE TABLE t1 (c1 text CONSTRAINT cns1 PRIMARY KEY, c2 integer) 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 primary_key N/A N/A c1 N/A type not_null text True N/A c2 N/A type integer N/A cns1 N/A columns description N/A c1 Test constraint cns1 N/A sql N/A N/A self to_sql inmap stmts N/A N/A N/A self assertEqual sql N/A COMMENT_STMT N/A test_drop_foreign_key_comment N/A N/A self N/A N/A N/A Drop the comment on an existing foreign key N/A stmts N/A CREATE TABLE t2 (c21 integer PRIMARY KEY, c22 text) CREATE TABLE t1 (c11 integer, c12 text, c13 integer CONSTRAINT cns1 REFERENCES t2 (c21)) COMMENT_STMT 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 t2 table t1 N/A columns primary_key N/A N/A c21 N/A type not_null integer True N/A c22 N/A type text N/A t2_pkey N/A columns N/A c21 N/A columns foreign_keys N/A N/A c11 N/A type integer N/A c12 N/A type text N/A c13 N/A type integer N/A cns1 N/A columns references N/A c13 N/A columns table N/A c21 t2 N/A sql N/A N/A self to_sql inmap stmts N/A N/A N/A self assertEqual sql N/A COMMENT ON CONSTRAINT cns1 ON t1 IS NULL N/A test_change_unique_constraint_comment N/A N/A self N/A N/A N/A Change existing comment on a unique constraint N/A stmts N/A CREATE TABLE t1 (c1 integer CONSTRAINT cns1 UNIQUE, c2 text) COMMENT_STMT 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 unique_constraints N/A N/A c1 N/A type integer N/A c2 N/A type text N/A cns1 N/A columns description N/A c1 Changed constraint cns1 N/A sql N/A N/A self to_sql inmap stmts N/A N/A sql N/A COMMENT ON CONSTRAINT cns1 ON t1 IS 'Changed constraint cns1' N/A test_constraint_comment_schema N/A N/A self N/A N/A N/A Add comment on a constraint for a table in another schema N/A stmts N/A CREATE SCHEMA s1 CREATE TABLE s1.t1 (c1 integer CONSTRAINT cns1 CHECK (c1 > 50), c2 text) N/A inmap N/A N/A self std_map N/A N/A N/A inmap update N/A schema s1 N/A table t1 N/A columns check_constraints N/A N/A c1 N/A type integer N/A c2 N/A type text N/A cns1 N/A columns expression description N/A c1 c1 > 50 Test constraint cns1 N/A sql N/A N/A self to_sql inmap stmts N/A N/A N/A sql N/A 0 COMMENT ON CONSTRAINT cns1 ON s1.t1 IS 'Test constraint cns1' N/A N/A N/A N/A __name__ __main__ N/A N/A N/A N/A N/A pytest cmdline main