svn commit: r504484 - in head/devel: . py-pytest-relaxed py-pytest-relaxed/files

Kubilay Kocak koobs at FreeBSD.org
Tue Jun 18 13:20:05 UTC 2019


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 at 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 <bsd.port.mk>

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/


More information about the svn-ports-all mailing list