This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author michael.foord
Recipients michael.foord
Date 2010-04-27.12:23:16
SpamBayes Score 7.366866e-06
Marked as misclassified No
Message-id <1272370999.28.0.856365005412.issue8547@psf.upfronthosting.co.za>
In-reply-to
Content
When test discovery is invoked on a package on the filesystem which is also installed in site-packages then importing the tests will look in the installed version. This causes discovery to run the wrong tests or fail.

We can detect this (compare the __file__ against the expected location) and also insert the top level path as the first location in sys.path instead of appending it to the end.

If we detect a failed import then we should error out with an appropriate message.

(Nose gets round this by patching __import__ to import from a specific location which seems potentially fragile.)
History
Date User Action Args
2010-04-27 12:23:19michael.foordsetrecipients: + michael.foord
2010-04-27 12:23:19michael.foordsetmessageid: <1272370999.28.0.856365005412.issue8547@psf.upfronthosting.co.za>
2010-04-27 12:23:17michael.foordlinkissue8547 messages
2010-04-27 12:23:16michael.foordcreate