attest icon indicating copy to clipboard operation
attest copied to clipboard

Scanning leaves loaded modules

Open dag opened this issue 13 years ago • 1 comments

This can shadow bugs where a module is accessed as an attribute of a package. Is there a way to "unport" modules? Deleting them from sys.modules leaves the attributes intact.

dag avatar May 19 '11 21:05 dag

I'm not sure if it is sanely possible to "unimport" in Python. Perhaps the default scanning should be limited to packages named 'tests' (including subpackages). This goes against the original ideals of Attest but might be sensible for a default. This is really only about when you run "attest" with no arguments specifying the location of the tests.

dag avatar Sep 06 '11 23:09 dag