From owner-svn-ports-all@freebsd.org Tue Jun 18 13:20:05 2019 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 77D3115BBD94; Tue, 18 Jun 2019 13:20:05 +0000 (UTC) (envelope-from koobs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E31AD74B11; Tue, 18 Jun 2019 13:20:04 +0000 (UTC) (envelope-from koobs@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D1122DA81; Tue, 18 Jun 2019 13:20:04 +0000 (UTC) (envelope-from koobs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5IDK4I2044703; Tue, 18 Jun 2019 13:20:04 GMT (envelope-from koobs@FreeBSD.org) Received: (from koobs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5IDK3BT044698; Tue, 18 Jun 2019 13:20:03 GMT (envelope-from koobs@FreeBSD.org) Message-Id: <201906181320.x5IDK3BT044698@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: koobs set sender to koobs@FreeBSD.org using -f From: Kubilay Kocak Date: Tue, 18 Jun 2019 13:20:03 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r504484 - in head/devel: . py-pytest-relaxed py-pytest-relaxed/files X-SVN-Group: ports-head X-SVN-Commit-Author: koobs X-SVN-Commit-Paths: in head/devel: . py-pytest-relaxed py-pytest-relaxed/files X-SVN-Commit-Revision: 504484 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E31AD74B11 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jun 2019 13:20:05 -0000 Author: koobs Date: Tue Jun 18 13:20:03 2019 New Revision: 504484 URL: https://svnweb.freebsd.org/changeset/ports/504484 Log: [NEW] devel/pytest-relaxed: Relaxed test discovery/organization for pytest This pytest plugin takes a page from the rest of Python, where you don't have to explicitly note public module/class members, but only need to hint as to which ones are private. By default, all files and objects pytest is told to scan will be considered tests; to mark something as not-a-test, simply prefix it with an underscore. WWW: https://pytest-relaxed.readthedocs.io/ Added: head/devel/py-pytest-relaxed/ head/devel/py-pytest-relaxed/Makefile (contents, props changed) head/devel/py-pytest-relaxed/distinfo (contents, props changed) head/devel/py-pytest-relaxed/files/ head/devel/py-pytest-relaxed/files/patch-tests_test__display.py (contents, props changed) head/devel/py-pytest-relaxed/pkg-descr (contents, props changed) Modified: head/devel/Makefile Modified: head/devel/Makefile ============================================================================== --- head/devel/Makefile Tue Jun 18 13:04:57 2019 (r504483) +++ head/devel/Makefile Tue Jun 18 13:20:03 2019 (r504484) @@ -4849,6 +4849,7 @@ SUBDIR += py-python-jenkins SUBDIR += py-python-magic SUBDIR += py-python-pcre + SUBDIR += py-pytest-relaxed SUBDIR += py-python-socketio SUBDIR += py-python-statsd SUBDIR += py-python-subunit Added: head/devel/py-pytest-relaxed/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/py-pytest-relaxed/Makefile Tue Jun 18 13:20:03 2019 (r504484) @@ -0,0 +1,27 @@ +# $FreeBSD$ + +PORTNAME= pytest-relaxed +PORTVERSION= 1.1.5 +CATEGORIES= devel python +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= koobs@FreeBSD.org +COMMENT= Relaxed test discovery/organization for pytest + +LICENSE= BSD2CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE + +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>=3,<5:devel/py-pytest@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}six>=1,<2:devel/py-six@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}decorator>=4,<5:devel/py-decorator@${PY_FLAVOR} + +USES= python +USE_PYTHON= autoplist distutils + +NO_ARCH= yes + +do-test: + @cd ${WRKSRC} && ${PYTHON_CMD} -m pytest -v -rs + +.include Added: head/devel/py-pytest-relaxed/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/py-pytest-relaxed/distinfo Tue Jun 18 13:20:03 2019 (r504484) @@ -0,0 +1,3 @@ +TIMESTAMP = 1560858639 +SHA256 (pytest-relaxed-1.1.5.tar.gz) = e39a7e5b14e14dfff0de0ad720dfffa740c128d599ab14cfac13f4deb34164a6 +SIZE (pytest-relaxed-1.1.5.tar.gz) = 26786 Added: head/devel/py-pytest-relaxed/files/patch-tests_test__display.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/py-pytest-relaxed/files/patch-tests_test__display.py Tue Jun 18 13:20:03 2019 (r504484) @@ -0,0 +1,32 @@ +# Two tests fail when warnings are present in the test run +# https://github.com/bitprophet/pytest-relaxed/issues/7 + +--- tests/test_display.py.orig 2019-06-14 18:05:29 UTC ++++ tests/test_display.py +@@ -18,7 +18,7 @@ def _expect_regular_output(testdir): + assert "== FAILURES ==" in output + assert "AssertionError" in output + # Summary +- assert "== 1 failed, 4 passed, 1 skipped in " in output ++ assert "== 1 failed, 4 passed, 1 skipped" in output + + + class TestRegularFunctions: +@@ -170,7 +170,7 @@ OtherBehaviors + assert "== FAILURES ==" in output + assert "AssertionError" in output + # Summary +- assert "== 1 failed, 4 passed, 1 skipped in " in output ++ assert "== 1 failed, 4 passed, 1 skipped" in output + + def test_tests_are_colorized_by_test_result( # noqa: F811,E501 + self, testdir, environ +@@ -225,7 +225,7 @@ OtherBehaviors + assert "== FAILURES ==" in output + assert "AssertionError" in output + # Summary +- assert "== 1 failed, 4 passed, 1 skipped in " in output ++ assert "== 1 failed, 4 passed, 1 skipped" in output + + def test_nests_many_levels_deep_no_problem(self, testdir): + testdir.makepyfile( Added: head/devel/py-pytest-relaxed/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/py-pytest-relaxed/pkg-descr Tue Jun 18 13:20:03 2019 (r504484) @@ -0,0 +1,8 @@ +This pytest plugin takes a page from the rest of Python, where you don't +have to explicitly note public module/class members, but only need to +hint as to which ones are private. + +By default, all files and objects pytest is told to scan will be considered +tests; to mark something as not-a-test, simply prefix it with an underscore. + +WWW: https://pytest-relaxed.readthedocs.io/