MCPcopy Create free account
hub / github.com/go-python/gopy / ResetPackages

Function ResetPackages

bind/package.go:44–50  ·  view source on GitHub ↗

ResetPackages resets any accumulated packages -- needed when doing tests

()

Source from the content-addressed store, hash-verified

42
43// ResetPackages resets any accumulated packages -- needed when doing tests
44func ResetPackages() {
45 universeMutex.Lock()
46 defer universeMutex.Unlock()
47 Packages = nil
48 makeGoPackage()
49 current = newSymtab(nil, universe)
50}
51
52// NewPackage creates a new Package, tying types.Package and ast.Package together.
53func NewPackage(pkg *types.Package, doc *doc.Package) (*Package, error) {

Callers 1

testPkgBackendFunction · 0.92

Calls 2

makeGoPackageFunction · 0.85
newSymtabFunction · 0.85

Tested by 1

testPkgBackendFunction · 0.74