svn commit: r444362 - in head/devel: . py-pytest-mock py-pytest-mock/files
Jimmy Olgeni
olgeni at FreeBSD.org
Mon Jun 26 10:32:26 UTC 2017
Author: olgeni
Date: Mon Jun 26 10:32:24 2017
New Revision: 444362
URL: https://svnweb.freebsd.org/changeset/ports/444362
Log:
Add devel/py-pytest-mock, a thin wrapper around the mock package
for easier use with py.test.
Includes upstream commit 2bb5fdf to fix 'make test'.
Added:
head/devel/py-pytest-mock/
head/devel/py-pytest-mock/Makefile (contents, props changed)
head/devel/py-pytest-mock/distinfo (contents, props changed)
head/devel/py-pytest-mock/files/
head/devel/py-pytest-mock/files/patch-test__pytest__mock.py (contents, props changed)
head/devel/py-pytest-mock/pkg-descr (contents, props changed)
Modified:
head/devel/Makefile
Modified: head/devel/Makefile
==============================================================================
--- head/devel/Makefile Mon Jun 26 10:10:20 2017 (r444361)
+++ head/devel/Makefile Mon Jun 26 10:32:24 2017 (r444362)
@@ -4620,6 +4620,7 @@
SUBDIR += py-pytest-capturelog
SUBDIR += py-pytest-django
SUBDIR += py-pytest-localserver
+ SUBDIR += py-pytest-mock
SUBDIR += py-pytest-runner
SUBDIR += py-pytest-timeout
SUBDIR += py-pytest-tornado
Added: head/devel/py-pytest-mock/Makefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/devel/py-pytest-mock/Makefile Mon Jun 26 10:32:24 2017 (r444362)
@@ -0,0 +1,25 @@
+# $FreeBSD$
+
+PORTNAME= pytest-mock
+PORTVERSION= 1.6.0
+CATEGORIES= devel python
+MASTER_SITES= CHEESESHOP
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= olgeni at FreeBSD.org
+COMMENT= Thin wrapper around the mock package for easier use with py.test
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools_scm>=0:devel/py${SLAVE_SUFFIX}-setuptools_scm
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}mock>0:devel/py-mock
+
+NO_ARCH= yes
+USES+= python
+USE_PYTHON= autoplist concurrent distutils
+
+do-test:
+ @cd ${WRKSRC} && ${PYTHON_CMD} -m pytest
+
+.include <bsd.port.mk>
Added: head/devel/py-pytest-mock/distinfo
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/devel/py-pytest-mock/distinfo Mon Jun 26 10:32:24 2017 (r444362)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1498381564
+SHA256 (pytest-mock-1.6.0.tar.gz) = 83a17cbcd4dbc7c6c9dc885a0d598f9acd11f2d5142e0718ed32e14538670c1f
+SIZE (pytest-mock-1.6.0.tar.gz) = 17780
Added: head/devel/py-pytest-mock/files/patch-test__pytest__mock.py
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/devel/py-pytest-mock/files/patch-test__pytest__mock.py Mon Jun 26 10:32:24 2017 (r444362)
@@ -0,0 +1,28 @@
+--- test_pytest_mock.py.orig 2017-06-25 15:24:57 UTC
++++ test_pytest_mock.py
+@@ -100,25 +100,6 @@ def test_mock_patch_dict(mocker):
+ assert x == {'original': 1}
+
+
+-def test_mock_fixture_is_deprecated(testdir):
+- """
+- Test that a warning emitted when using deprecated "mock" fixture.
+- """
+- testdir.makepyfile('''
+- import warnings
+- import os
+- warnings.simplefilter('always')
+-
+- def test_foo(mock, tmpdir):
+- mock.patch('os.listdir', return_value=['mocked'])
+- assert os.listdir(str(tmpdir)) == ['mocked']
+- mock.stopall()
+- assert os.listdir(str(tmpdir)) == []
+- ''')
+- result = testdir.runpytest('-s')
+- result.stderr.fnmatch_lines(['*"mock" fixture has been deprecated*'])
+-
+-
+ def test_deprecated_mock(mock, tmpdir):
+ """
+ Use backward-compatibility-only mock fixture to ensure complete coverage.
Added: head/devel/py-pytest-mock/pkg-descr
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/devel/py-pytest-mock/pkg-descr Mon Jun 26 10:32:24 2017 (r444362)
@@ -0,0 +1,3 @@
+Thin wrapper around the mock package for easier use with py.test.
+
+WWW: https://github.com/pytest-dev/pytest-mock/
More information about the svn-ports-all
mailing list