For testing with not installed python modules, invoking setup.py
commands are often preferable and addresses both PYTHONPATH and 2to3.

For nosetests: Use "python setup.py nosetests" instead.

For pytest: Use "python setup.py pytest" instead. Note that
"python-pytest-runner" needs to be in checkdepends.

There are additional common hacks if the tests need to invoke an entry
points or requires the versioned distribution object. Either:

1) Installing it in a temporary place and hack PYTHONPATH/PATH.
2) Create a sitecustomize.py and add the build dir to site. (See
python2-faulthandler for an example)

And finally if above still didn't solve it, you may choose to skip the
problematic part of the tests or use "heavier" workarounds like a venv.

-- 
Regards,
Felix Yan

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to