The pytest testing tool makes it easy to write small tests, yet scales to
support complex functional testing.
Features:
* Detailed info on failing assert statements
* Auto-discovery of test modules and functions
* Modular fixtures to manage small or parametrized long-lived test resources
* Can run unittest (or trial), nose test suites out of the box
* Rich plugin architecture, with over 315+ external plugins
NOTE: If this package has multiple flavors (see below), then use one of them instead of the name specified above. NOTE: This is a Python port. Instead of py312-pytest listed in the above command, you can pick from the names under the Packages section.
Mk/Uses/python.mk: Introduce PY_TOMLI
- Convert ports to use PY_TOMLI to simplify Makefile.
The minimal version is set to 2.0.1 because it is required by multiple ports
such as devel/py-poetry.
The upper bound of version is set to 3 because it is limited by devel/py-poetry.
With hat: python
Mk/Uses/python.mk: Introduce PY_EXCEPTIONGROUP
The minimal version is set to 1.1.1 because it is required by devel/py-cattrs.
Convert ports to use PY_EXCEPTIONGROUP to simplify Makefile.
With hat: python
devel/py-setuptools-scm: update to 8.0.4
Directory and PORTNAME changed to match normalised name in release
tarball; consumers updated to match.
Although setuptools itself is specified as a run dependency in the
Python package metadata, it is currently left out here to prevent
environment pollution until at least PR 270510 is committed.
Additionally, this version of setuptools-scm requires setuptools>=61,
which means this version is only meant for USE_PYTHON=pep517 ports
as all USE_PYTHON=distutils ports will switch to devel/py-setuptools58
also after PR 270510. science/py-emmet-core is switched to
devel/py-setuptools_scm7 accordingly, as it specifies setuptools-scm<8.
devel/py-{flit-scm,hatch-vcs} have ${PY_SETUPTOOLS} added to
RUN_DEPENDS to compensate.
Further details: https://wiki.freebsd.org/Python/setuptools
Reported by: yuri
Co-authored by: matthew
Exp-run by: antoine (earlier iteration)
Approved by: yuri (science/py-emmet-core, previous iteration)
PR: 272134
Differential Revision: https://reviews.freebsd.org/D39288
devel/py-pytest: Remove py-py from RUN_DEPENDS
Upstream no longer depends on py library from 7.2.0:
https://docs.pytest.org/en/stable/changelog.html
py-py in portstree was documented vulnerability and no patch to fix it.
devel/py-setuptools: convert individual consumers to ${PY_SETUPTOOLS}
Currently a no-op, but in the future outputs the correct setuptools
port depending on whether USES_PYTHON=distutils is specified.
With hat: python
PR: 270510, 270358
all: remove explicit versions in USES=python for "3.x+"
The logic in USES=python will automatically convert this to 3.8+ by
itself.
Adjust two ports that only had Python 3.7 mentioned but build fine
on Python 3.8 too.
finance/quickfix: mark BROKEN with PYTHON
libtool: compile: c++ -DHAVE_CONFIG_H -I. -I../.. -I -I. -I.. -I../.. -I../C++
-DLIBICONV_PLUG -DPYTHON_MAJOR_VERSION=3 -Wno-unused-variable
-Wno-maybe-uninitialized -O2 -pipe -DLIBICONV_PLUG -fstack-protector-strong
-fno-strict-aliasing -DLIBICONV_PLUG -Wall -ansi
-Wno-unused-command-line-argument -Wpointer-arith -Wwrite-strings
-Wno-overloaded-virtual -Wno-deprecated-declarations -Wno-deprecated -std=c++0x
-MT _quickfix_la-QuickfixPython.lo -MD -MP -MF
.deps/_quickfix_la-QuickfixPython.Tpo -c QuickfixPython.cpp -fPIC -DPIC -o
.libs/_quickfix_la-QuickfixPython.o
warning: unknown warning option '-Wno-maybe-uninitialized'; did you mean
'-Wno-uninitialized'? [-Wunknown-warning-option]
QuickfixPython.cpp:175:11: fatal error: 'Python.h' file not found
^~~~~~~~~~
1 warning and 1 error generated.
Reviewed by: portmgr, vishwin, yuri
Differential Revision: <https://reviews.freebsd.org/D40568>
Remove WWW entries moved into port Makefiles
Commit b7f05445c00f has added WWW entries to port Makefiles based on
WWW: lines in pkg-descr files.
This commit removes the WWW: lines of moved-over URLs from these
pkg-descr files.
Approved by: portmgr (tcberner)
Add WWW entries to port Makefiles
It has been common practice to have one or more URLs at the end of the
ports' pkg-descr files, one per line and prefixed with "WWW:". These
URLs should point at a project website or other relevant resources.
Access to these URLs required processing of the pkg-descr files, and
they have often become stale over time. If more than one such URL was
present in a pkg-descr file, only the first one was tarnsfered into
the port INDEX, but for many ports only the last line did contain the
port specific URL to further information.
There have been several proposals to make a project URL available as
a macro in the ports' Makefiles, over time.
(Only the first 15 lines of the commit message are shown above )
devel/py-pytest4: preserve 4.x version of devel/py-pytest
- Preserve 4.x version of pytest for the ports which are not
compatible with pytest 6.x. This is a prerequisite for updating
pytest.
PR: 256624
Approved by: maintainer timeout (python@, many months)
Mk: switch PYTHON_REL to 5 digits to support python 3.10.x
PR: 255013
Differential Revision: https://reviews.freebsd.org/D29418
Exp-run by: antoine
Approved by: wen@, no objection from python@ or portmgr@
devel/py-pytest: Update to 4.3.1
- Add a number of optional test dependencies to un-skip more tests
- Use PYTHON_VER instead of PYTHON_REL to match conditionals to
upstream spec.
- Move mock to a conditional (2.7) dependency (per upstream spec)
Changelog:
https://github.com/pytest-dev/pytest/blob/4.3.1/CHANGELOG.rst
PR: 235339
Submitted by: John W. O'Brien <john saltant com> (with changes)
Approved by: koobs (python, maintainer)
Convert Python ports to FLAVORS.
Ports using USE_PYTHON=distutils are now flavored. They will
automatically get flavors (py27, py34, py35, py36) depending on what
versions they support.
There is also a USE_PYTHON=flavors for ports that do not use distutils
but need FLAVORS to be set. A USE_PYTHON=noflavors can be set if
using distutils but flavors are not wanted.
A new USE_PYTHON=optsuffix that will add PYTHON_PKGNAMESUFFIX has been
added to cope with Python ports that did not have the Python
PKGNAMEPREFIX but are flavored.
USES=python now also exports a PY_FLAVOR variable that contains the
(Only the first 15 lines of the commit message are shown above )
devel/py3-pytest: unbreak after r441543
===========================================================================
=======================<phase: build-depends >============================
===> py36-pytest-3.1.2 depends on package: py36-setuptools_scm>=0 - not found
===> py36-pytest-3.1.2 depends on package:
/packages/All/py36-setuptools_scm-1.15.5.txz - not found
===> USE_PACKAGE_DEPENDS_ONLY set - not building missing dependency from
source
*** Error code 1
Reported by: pkg-fallout
devel/py-pytest-asyncio: unbreak with python < 3.x by default
=======================<phase: run-depends >============================
===> py35-pytest-asyncio-0.5.0 depends on package: py35-pytest>=3.0.2 - not
found
===> py35-pytest-asyncio-0.5.0 depends on package:
/packages/All/py35-pytest-3.0.3.txz - not found
===> USE_PACKAGE_DEPENDS_ONLY set - not building missing dependency from
source
*** [run-depends] Error code 1
Reported by: pkg-fallout
devel/py-pytest: Update to 2.8.7
- Update PORTVERSION and distinfo checksum (2.8.7)
- Remove nose from TEST_DEPENDS (only mentioned in tox.ini)
- Patch setup.py not to install version-suffixed console_scripts
- Enable "concurrent" Python installation accordingly
- Remove USES=zip, DISTFILES is now a tarball
Changes:
http://pytest.org/latest/changelog.html
devel/py-pytest: Update to 2.8.5
- Update PORTVERSION and distinfo checksum (2.8.5)
- Add USES zip accordingly (no tar.gz @ PyPI)
- Add pytest-xdist to TEST_DEPENDS
- Add NO_ARCH
- Remove TESTS option and OPTIONS helpers
- Update test target to new convention
Changes:
https://github.com/pytest-dev/pytest/blob/2.8.5/CHANGELOG
devel/py-pytest: Update to 2.6.4
- Update to 2.6.4
- Update COMMENT to reflect upstream description (setup.py)
- Update RUN_DEPENDS and TEST_DEPENDS
- Add TESTS option
- Update pkg-descr for more detail on features
Approved by: python (with hat)
Pass this guys to python@ because it's a general testing libraries, that is
used in many of our regression-test targets in python ports Makefiles.
Discussed with: koobs