Author michael.foord
Recipients michael.foord
Date 2010-12-04.00:20:06
SpamBayes Score 4.52464e-07
Marked as misclassified No
Message-id <1291422007.54.0.147727211127.issue10620@psf.upfronthosting.co.za>
In-reply-to
Content
Feature request against unittest2. Issue 18: https://code.google.com/p/unittest-ext/issues/detail?id=18

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`.
History
Date User Action Args
2010-12-04 00:20:07michael.foordsetrecipients: + michael.foord
2010-12-04 00:20:07michael.foordsetmessageid: <1291422007.54.0.147727211127.issue10620@psf.upfronthosting.co.za>
2010-12-04 00:20:06michael.foordlinkissue10620 messages
2010-12-04 00:20:06michael.foordcreate