Skip to content

Comments

ENH: Add support for module-style paths in addition to file-style paths.#10

Open
ssanderson wants to merge 1 commit intoalonho:masterfrom
ssanderson:master
Open

ENH: Add support for module-style paths in addition to file-style paths.#10
ssanderson wants to merge 1 commit intoalonho:masterfrom
ssanderson:master

Conversation

@ssanderson
Copy link

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.

@alonho
Copy link
Owner

alonho commented Jun 25, 2014

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).

@alonho
Copy link
Owner

alonho commented Jun 25, 2014

I'll get back to this in a few days once I return home from a conference. Thanks again.

@ssanderson
Copy link
Author

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?

@alonho
Copy link
Owner

alonho commented Jul 1, 2014

would you mind adding some tests?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants