Index: head/devel/py-mock/Makefile =================================================================== --- head/devel/py-mock/Makefile (revision 517931) +++ head/devel/py-mock/Makefile (revision 517932) @@ -1,36 +1,35 @@ # Created by: jessekempf@gmail.com # $FreeBSD$ PORTNAME= mock 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 -.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 Index: head/devel/py-mock/pkg-descr =================================================================== --- head/devel/py-mock/pkg-descr (revision 517931) +++ head/devel/py-mock/pkg-descr (revision 517932) @@ -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/