svn commit: r517602 - head/devel/py-mock
Kubilay Kocak
koobs at FreeBSD.org
Fri Nov 15 01:05:25 UTC 2019
On 15/11/2019 4:11 am, Enji Cooper wrote:
> + @cd ${WRKSRC} && pytest
Hi Enji :)
Python ports *must* always reference/use *Python-version* specific
versions of binaries/scripts/interpreters for *all* invocations of them,
as it can never be guaranteed that:
a) A/the non-versioned binary name is installed, and
b) That the non-versioned binary name points to expected (same) version
as the port is being tested/built with.
The canonical pytest invocation is:
cd ${WRKSRC} && ${PYTHON_CMD} -m pytest -v -rs -o addopts=
-v: one line per test (rather than dots per test)
-rs: Show skip/skipped reasons
-o addopts=: Override setup.cfg/pytest.ini options that sometimes set
arguments that require additional dependencies (--cov for coverage) or
other test arguments that we dont want)
Note: Some Python packages 'require' or 'depend on' invoking the pytest
script directly, as the python path semantics of this differ from using
pythonX.Y -m pytest, but try to use the first one unless it doesn't work.
In these cases, the correct invocation is usually:
cd ${WRKSRC} && ${LOCALBASE}/bin/pytest-${PYTHON_VER} -v -rs -o addopts=
More information about the freebsd-python
mailing list