You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee='https://github.com/voidspace'closed_at=<Date2011-01-03.18:19:56.210>created_at=<Date2010-12-04.00:20:06.349>labels= ['type-bug', 'library']
title='`python -m uniittest` should work with file paths as well as test module names'updated_at=<Date2011-01-03.18:19:56.209>user='https://github.com/voidspace'
As providing a file path instead of module name to the unittest command line runner currently fails there is no backwards compatibility issue with making this work.
The only potential issue is if a test suite or module is genuinely 'foo.py' then we could end up attempting to load the file instead of the specified suite / module. To get round this we should only attempt to load tests from a file by checking the file exists first.
The specified still needs to be *imported* to load tests from it, so the file path will be converted to a module name by replacing path separators with '.'.
The way to execute test files that aren't importable as modules is to execute them directly not using python -m unittest.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: