ProjectLevelSymbolTable { public static ProjectLevelSymbolTable empty() { return new ProjectLevelSymbolTable(Collections.emptyMap()); } ProjectLevelSymbolTable(); private  ProjectLevelSymbolTable(Map<String, Set<Symbol>> globalSymbolsByModuleName); static ProjectLevelSymbolTable empty(); static ProjectLevelSymbolTable from(Map<String, Set<Symbol>> globalSymbolsByModuleName); void addModule(FileInput fileInput, String packageName, PythonFile pythonFile); @CheckForNull Symbol getSymbol(@Nullable String fullyQualifiedName); @CheckForNull Set<Symbol> getSymbolsFromModule(@Nullable String moduleName);  }
@Test public void unresolved_wildcard_import() { FileInput tree = parse( new SymbolTableBuilder("my_package", pythonFile("my_module.py"), empty()), "from external import *", "print(a)" ); ImportFrom importFrom = ((ImportFrom) PythonTestUtils.getAllDescendant(tree, t -> t.is(Tree.Kind.IMPORT_FROM)).get(0)); assertThat(importFrom.hasUnresolvedWildcardImport()).isTrue(); }
@Test public void imports_wont_trigger_typeshed_lookup() { FileInput tree = parse( new SymbolTableBuilder("", pythonFile("os.py"), empty()), "from os import *", "from . import *" ); ImportFrom importFrom = ((ImportFrom) PythonTestUtils.getAllDescendant(tree, t -> t.is(Tree.Kind.IMPORT_FROM)).get(0)); assertThat(importFrom.hasUnresolvedWildcardImport()).isTrue(); }