nosecomplete
nosecomplete copied to clipboard
ENH: Add support for module-style paths in addition to file-style paths.
Adds support for autocompleting paths that look like foo.bar:Buzz
in addition to foo/bar:Buzz
. This makes it easier to re-run tests from a previous run, since nose prints filenames as modules by default.
Thanks for opening the pull request! I want to add this feature but I'm wondering if it's better to import the module if it's a module name (for example: my code is available in PYTHONPATH but not in the project's root directory so I would have to chdir).
I'll get back to this in a few days once I return home from a conference. Thanks again.
The main concern I'd have about enabling this syntax via importing is that doing so might take a fair amount of time/cause nontrivial side-effects. In particular, I think it's a pretty common idiom to use setUpModule
to do things like initialize database connections and populate test data. Maybe this could be made toggle-able in a manner similar to how the test discovery methods are currently managed?
would you mind adding some tests?