def testUnionFieldWithFunctionClash(self): assertErrorsPresent( self, "scope_symbols/union_field_with_function_clash_error.zs", [ ":7:21: Symbol name 'someField' clashes with 'some_field' " + "since both are generated equally in Python code!", "[ERROR] Python Generator: Symbol name clash detected!" ])
def testConstWithApiClash(self): assertErrorsPresent(self, "api_clashing/const_with_api_clash_error.zs", [ ":3:14: Cannot generate python source 'API.py' for symbol 'API', " + "since it would clash with auto-generated 'api.py'! Please choose different name.", "Python Generator: Clash in generated code detected!" ])
def testConstWithConstClashError(self): assertErrorsPresent(self, "module_names/const_with_const_clash_error.zs", [ ":4:14: Module 'some_name' generated for package symbol 'SomeName' " + "clashes with module generated for package symbol 'SOME_NAME' defined at 3:14!", "[ERROR] Python Generator: Module name clashing detected!" ])
def testChoiceWithUnionClashError(self): assertErrorsPresent(self, "module_names/choice_with_union_clash_error.zs", [ ":11:7: Module 'some_name' generated for package symbol 'Some_Name' " + "clashes with module generated for package symbol 'SomeName' defined at 3:8!", "[ERROR] Python Generator: Module name clashing detected!" ])
def testBitmaskValueSnakeCaseClash(self): assertErrorsPresent( self, "scope_symbols/bitmask_value_snake_case_clash_error.zs", [ ":9:5: Symbol name 'create_permission' clashes with 'CREATE_PERMISSION' " + "since both are generated equally in Python code!", "[ERROR] Python Generator: Symbol name clash detected!" ])
def testChoiceFieldNamesClash(self): assertErrorsPresent( self, "scope_symbols/choice_field_names_clash_error.zs", [ ":8:17: Symbol name 'some_field' clashes with 'someField' " + "since both are generated equally in Python code!", "[ERROR] Python Generator: Symbol name clash detected!" ])
def testSqlDatabaseTableNamesClash(self): assertErrorsPresent( self, "scope_symbols/sql_database_table_names_clash_error.zs", [ ":12:15: Symbol name 'test_table' clashes with 'testTable' " + "since both are generated equally in Python code!", "[ERROR] Python Generator: Symbol name clash detected!" ])
def testPubsubMessageNamesClash(self): assertErrorsPresent( self, "scope_symbols/pubsub_message_names_clash_error.zs", [ ":16:60: Symbol name 'powerOfTwo' clashes with 'power_of_two' " + "since both are generated equally in Python code!", "[ERROR] Python Generator: Symbol name clash detected!" ])
def testServiceMethodNamesClash(self): assertErrorsPresent( self, "scope_symbols/service_method_names_clash_error.zs", [ ":16:14: Symbol name 'power_of_two' clashes with 'powerOfTwo' " + "since both are generated equally in Python code!", "[ERROR] Python Generator: Symbol name clash detected!" ])
def testChoiceParameterNamesClash(self): assertErrorsPresent( self, "scope_symbols/choice_parameter_names_clash_error.zs", [ ":3:42: Symbol name 'some_param' clashes with 'someParam' " + "since both are generated equally in Python code!", "[ERROR] Python Generator: Symbol name clash detected!" ])
def testEnumItemSnakeCaseClash(self): assertErrorsPresent( self, "scope_symbols/enum_item_snake_case_clash_error.zs", [ ":9:5: Symbol name 'dark_green' clashes with 'DARK_GREEN' " + "since both are generated equally in Python code!", "[ERROR] Python Generator: Symbol name clash detected!" ])
def testChoicePublicMethodPropertyClash(self): assertErrorsPresent( self, "generated_symbols/choice_public_method_property_clash_error.zs", [ ":6:14: Property name 'write' generated for symbol 'write' clashes with generated API method!", "[ERROR] Python Generator: Property name clash detected!" ])
def testStructureFunctionNamesNamesClash(self): assertErrorsPresent( self, "scope_symbols/structure_function_names_clash_error.zs", [ ":10:19: Symbol name 'someName' clashes with 'some_name' " + "since both are generated equally in Python code!", "[ERROR] Python Generator: Symbol name clash detected!" ])
def testBitmaskWithEnumClashError(self): assertErrorsPresent(self, "module_names/bitmask_with_enum_clash_error.zs", [ ":9:12: Module 'color_info' generated for package symbol 'Color_Info' " + "clashes with module generated for package symbol 'ColorInfo' defined at 3:15!", "[ERROR] Python Generator: Module name clashing detected!" ])
def testSqlTableColumnNamesClash(self): assertErrorsPresent( self, "scope_symbols/sql_table_column_names_clash_error.zs", [ ":6:12: Symbol name 'some_id' clashes with 'someId' " + "since both are generated equally in Python code!", "[ERROR] Python Generator: Symbol name clash detected!" ])
def testInstantiateTypeWithApiClash(self): assertErrorsPresent( self, "api_clashing/instantiate_type_with_api_clash_error.zs", [ ":8:33: Cannot generate python source 'Api.py' for symbol 'Api', " + "since it would clash with auto-generated 'api.py'! Please choose different name.", "Python Generator: Clash in generated code detected!" ])
def testUnionPublicMethodFunctionClash(self): assertErrorsPresent( self, "generated_symbols/union_public_method_function_clash_error.zs", [ ":7:21: Function name 'bitsizeof' generated for symbol 'bitsizeof' " + "clashes with generated API method!", "[ERROR] Python Generator: Function name clash detected!" ])
def testUnionInvalidPropertyNamePrivate(self): assertErrorsPresent( self, "generated_symbols/union_invalid_property_name_private_error.zs", [ ":5:12: Invalid property name '_choice' generated for symbol '_choice'. " + "Property names cannot start with '_'!", "[ERROR] Python Generator: Property name error detected!" ])
def testUnionChoiceTagPropertyClash(self): assertErrorsPresent( self, "generated_symbols/union_choice_tag_property_clash_error.zs", [ ":6:12: Property name 'choice_tag' generated for symbol 'choiceTag' " + "clashes with generated API method!", "[ERROR] Python Generator: Property name clash detected!" ])
def testStructurePublicMethodPropertyClash(self): assertErrorsPresent( self, "generated_symbols/structure_public_method_property_clash_error.zs", [ ":5:12: Property name 'read' generated for symbol 'read' clashes with generated API method!", "[ERROR] Python Generator: Property name clash detected!" ])
def testServiceInvalidMethodNamePrivate(self): assertErrorsPresent( self, "generated_symbols/service_invalid_method_name_private_error.zs", [ ":11:14: Invalid method name '_service' generated for symbol '_service'. " + "Method names cannot start with '_'!", "[ERROR] Python Generator: Method name error detected!" ])
def testStructureWithServiceClashError(self): assertErrorsPresent( self, "module_names/structure_with_service_clash_error.zs", [ ":8:9: Module 'some_name' generated for package symbol 'Some_Name' " + "clashes with module generated for package symbol 'SomeName' defined at 3:8!", "[ERROR] Python Generator: Module name clashing detected!" ])
def testStructureFieldWithParameterClash(self): assertErrorsPresent( self, "scope_symbols/structure_field_with_parameter_clash_error.zs", [ ":5:12: Symbol name 'some_identifier' clashes with 'someIdentifier' " + "since both are generated equally in Python code!", "[ERROR] Python Generator: Symbol name clash detected!" ])
def testPubsubWithServiceClashError(self): assertErrorsPresent( self, "module_names/pubsub_with_service_clash_error.zs", [ ":18:8: Module 'math_service' generated for package symbol 'MathService' " + "clashes with module generated for package symbol 'Math_Service' defined at 13:9!", "[ERROR] Python Generator: Module name clashing detected!" ])
def testUnionPublicMethodPropertyClash(self): assertErrorsPresent( self, "generated_symbols/union_public_method_property_clash_error.zs", [ ":6:12: Property name 'bitsizeof' generated for symbol 'bitsizeof' " + "clashes with generated API method!", "[ERROR] Python Generator: Property name clash detected!" ])
def testStructureWithSubtypeClashError(self): assertErrorsPresent( self, "module_names/structure_with_subtype_clash_error.zs", [ ":8:24: Module 'some_good_name' generated for package symbol 'SomeGoodName' " + "clashes with module generated for package symbol 'SOME_GOOD_NAME' defined at 3:8!", "[ERROR] Python Generator: Module name clashing detected!" ])
def testSqlDatabaseWithSqlTableClashError(self): assertErrorsPresent( self, "module_names/sql_database_with_sql_table_clash_error.zs", [ ":9:14: Module 'some_good_name' generated for package symbol 'SomeGoodName' " + "clashes with module generated for package symbol 'Some_Good_Name' defined at 3:11!", "[ERROR] Python Generator: Module name clashing detected!" ])
def testChoiceParameterWithFunctionClash(self): assertErrorsPresent( self, "scope_symbols/choice_parameter_with_function_clash_error.zs", [ ":12:19: Symbol name 'func_array' clashes with 'funcArray' " + "since both are generated equally in Python code!", "[ERROR] Python Generator: Symbol name clash detected!" ])
def testTopLevelPackageTypingClash(self): assertErrorsPresent(self, "top_level_package_clashing/top_level_package_typing_clash_error.zs", [ ":1:9: Top level package 'typing' clashes with Python 'typing' module " + "which is used by generated code.", "[ERROR] Python Generator: Top level package clash detected!" ] )
def testApiPackageWithApiClash(self): assertErrorsPresent( self, "api_clashing/api_package_with_api_clash_error.zs", [ ":1:9: Cannot generate python package 'api' for package " + "'api_clashing.api_package_with_api_clash_error.api.some_package', " + "since it would clash with auto-generated 'api.py'! Please choose different package name.", "[ERROR] Python Generator: Clash in generated code detected!" ])