From owner-svn-ports-head@freebsd.org Mon Jun 26 10:32:26 2017 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8EE36DA6947; Mon, 26 Jun 2017 10:32:26 +0000 (UTC) (envelope-from olgeni@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68F2D72CFE; Mon, 26 Jun 2017 10:32:26 +0000 (UTC) (envelope-from olgeni@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5QAWPuO048487; Mon, 26 Jun 2017 10:32:25 GMT (envelope-from olgeni@FreeBSD.org) Received: (from olgeni@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5QAWPAV048482; Mon, 26 Jun 2017 10:32:25 GMT (envelope-from olgeni@FreeBSD.org) Message-Id: <201706261032.v5QAWPAV048482@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: olgeni set sender to olgeni@FreeBSD.org using -f From: Jimmy Olgeni Date: Mon, 26 Jun 2017 10:32:25 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r444362 - in head/devel: . py-pytest-mock py-pytest-mock/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jun 2017 10:32:26 -0000 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@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 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/