mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-23 04:23:08 +00:00
devel/py-mock: Take MAINTAINER'ship, level up ports compliance
* Use upstream (setup.cfg) summary as COMMENT * Fix dependencies (six is not a build time dependency) * Use GitHub (tests not packaged in PyPI sdist) * Standardize pytest invocation (show skip reasons, one line per test) * Use upstream (setup.cfg) description as pkg-descr * Use upstream (setup.cfg) home-page as pkg-descr WWW URL PR: 241780 Approved by: portmgr (unmaintained port. blanket(s): ports compliance, bugfix(es)) MFH: No (3.x might be API incompatible for consumers, unclear)
This commit is contained in:
parent
e32aac7ed2
commit
28ab316acb
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=517932
@ -6,31 +6,30 @@ PORTVERSION= 3.0.5
|
||||
CATEGORIES= devel python
|
||||
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
||||
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
COMMENT= Mock unit tests for Python
|
||||
MAINTAINER= koobs@FreeBSD.org
|
||||
COMMENT= Rolling backport of unittest.mock for all Pythons
|
||||
|
||||
LICENSE= BSD2CLAUSE
|
||||
LICENSE_FILE= ${WRKSRC}/LICENSE.txt
|
||||
|
||||
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}six>=1.9:devel/py-six@${PY_FLAVOR}
|
||||
RUN_DEPENDS:= ${BUILD_DEPENDS}
|
||||
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}six>=0:devel/py-six@${PY_FLAVOR}
|
||||
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR}
|
||||
|
||||
USES= python
|
||||
USE_GITHUB= yes # tests not packages in PyPI sdist
|
||||
USE_PYTHON= autoplist concurrent distutils
|
||||
|
||||
NO_ARCH= yes
|
||||
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= testing-cabal
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if ${PYTHON_REL} < 3300
|
||||
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}funcsigs>=0:devel/py-funcsigs@${PY_FLAVOR}
|
||||
.if ${PYTHON_VER} < 3.3
|
||||
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}funcsigs>=1:devel/py-funcsigs@${PY_FLAVOR}
|
||||
.endif
|
||||
|
||||
do-test:
|
||||
@cd ${WRKSRC} && pytest
|
||||
@cd ${WRKSRC} && ${PYTHON_CMD} -m pytest -v -rs -o addopts=
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
|
@ -1,9 +1,11 @@
|
||||
A Python Mocking and Patching Library for Testing
|
||||
mock is a library for testing in Python. It allows you to replace parts of
|
||||
your system under test with mock objects and make assertions about how
|
||||
they have been used.
|
||||
|
||||
mock is a Python module that provides a core Mock class. It is intended to
|
||||
reduce the need for creating a host of trivial stubs throughout your test suite.
|
||||
After performing an action, you can make assertions about which methods /
|
||||
attributes were used and arguments they were called with. You can also specify
|
||||
return values and set needed attributes in the normal way.
|
||||
mock is now part of the Python standard library, available as
|
||||
unittest.mock in Python 3.3 onwards.
|
||||
|
||||
WWW: https://pypi.org/project/mock/
|
||||
This package contains a rolling backport of the standard library mock code
|
||||
compatible with Python 2.7 and 3.4 and up.
|
||||
|
||||
WWW: https://mock.readthedocs.org/en/latest/
|
||||
|
Loading…
Reference in New Issue
Block a user