def test_project_loader_with_module_with_imported_symbol_of_interest( self, monkey_patcher): module_verifier = ModuleVerifier( module_fake_with_imported_symbols_of_interest) module_verifier.add_expected_symbol_of_interest( module_fake_with_imported_symbols_of_interest.symbol_of_interest) module_verifier.add_expected_non_symbol_of_interest( module_fake_with_imported_symbols_of_interest.SymbolOfInterest) module_verifier.set_expected_symbols_of_interest_type(CallableSymbol) module_verifier.verify(project_loader, monkey_patcher)
def test_project_loader_detects_nested_functions_in_method_as_symbol_of_interest( self, monkey_patcher): module_verifier = ModuleVerifier( ModuleFakeClassWithClassesWithNestedAnnotatedCallables) module_verifier.add_expected_symbol_of_interest( ModuleFakeClassWithClassesWithNestedAnnotatedCallables. SymbolOfInterest) module_verifier.add_expected_non_symbol_of_interest( ModuleFakeClassWithClassesWithNestedAnnotatedCallables. NonSymbolOfInterest) module_verifier.set_expected_symbols_of_interest_type(ClassSymbol) module_verifier.verify(project_loader, monkey_patcher)
def test_module_with_symbol_interest_that_is_set_to_variable( self, monkey_patcher): module_verifier = ModuleVerifier( module_fake_with_symbols_of_interest_set_to_variables) module_verifier.add_expected_symbol_of_interest( module_fake_with_symbols_of_interest_set_to_variables. symbol_of_interest) module_verifier.set_expected_symbols_of_interest_type(CallableSymbol) module_verifier.verify(project_loader, monkey_patcher)