Date: Tue, 19 Nov 2019 00:37:29 +0000 (UTC) From: Kubilay Kocak <koobs@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r517932 - head/devel/py-mock Message-ID: <201911190037.xAJ0bTvq062886@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: koobs Date: Tue Nov 19 00:37:28 2019 New Revision: 517932 URL: https://svnweb.freebsd.org/changeset/ports/517932 Log: 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) Modified: head/devel/py-mock/Makefile head/devel/py-mock/pkg-descr Modified: head/devel/py-mock/Makefile ============================================================================== --- head/devel/py-mock/Makefile Tue Nov 19 00:34:16 2019 (r517931) +++ head/devel/py-mock/Makefile Tue Nov 19 00:37:28 2019 (r517932) @@ -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> Modified: head/devel/py-mock/pkg-descr ============================================================================== --- head/devel/py-mock/pkg-descr Tue Nov 19 00:34:16 2019 (r517931) +++ head/devel/py-mock/pkg-descr Tue Nov 19 00:37:28 2019 (r517932) @@ -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/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201911190037.xAJ0bTvq062886>