aboutsummaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2016-07-18 16:15:01 +0000
committerJan Beich <jbeich@FreeBSD.org>2016-07-18 16:15:01 +0000
commitc02ff86a831fd86adb36b420aa381fdd45ba4f4f (patch)
tree5b257c449ca2b53cb465e505ce3e85f0728e640e /sysutils
parentb4552dabef0b02c9007f088095968bf1c3ce5445 (diff)
downloadports-c02ff86a831fd86adb36b420aa381fdd45ba4f4f.tar.gz
ports-c02ff86a831fd86adb36b420aa381fdd45ba4f4f.zip
Invoke pytest from within desired python version
When testing a port for a non-default python py.test may fail to find dependencies for default version because they weren't built e.g., $ make test PYTHON_VERSION=python3.5 -C devel/py-apscheduler [...] During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.5/site-packages/_pytest/config.py", line 319, in _importconftest mod = conftestpath.pyimport() File "/usr/local/lib/python3.5/site-packages/py/_path/local.py", line 650, in pyimport __import__(modname) File "/usr/ports/devel/py-apscheduler/work/APScheduler-3.2.0/tests/conftest.py", line 8, in <module> from apscheduler.job import Job File "/usr/ports/devel/py-apscheduler/work/APScheduler-3.2.0/apscheduler/job.py", line 4, in <module> import six ImportError: No module named 'six' ERROR: could not load /usr/ports/devel/py-apscheduler/work/APScheduler-3.2.0/tests/conftest.py Approved by: portmgr blanket
Notes
Notes: svn path=/head/; revision=418711
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/py-honcho/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/sysutils/py-honcho/Makefile b/sysutils/py-honcho/Makefile
index 313c48518f69..27c05a4c5740 100644
--- a/sysutils/py-honcho/Makefile
+++ b/sysutils/py-honcho/Makefile
@@ -22,6 +22,6 @@ USES= python
USE_PYTHON= autoplist distutils
regression-test:
- @cd ${WRKSRC} && py.test
+ @(cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest)
.include <bsd.port.mk>