From 1bcaa688325cc38554aef1a4223d78e599656fda Mon Sep 17 00:00:00 2001 From: Kubilay Kocak Date: Fri, 26 Feb 2016 03:43:18 +0000 Subject: [PATCH] [NEW] devel/py-pytest-localserver: Py.test Plugin to test server connections locally pytest-localserver is a plugin for the pytest testing framework which enables you to test server connections locally. Sometimes monkeypatching urllib2.urlopen() just does not cut it, for instance if you work with urllib2.Request, define your own openers/handlers or work with httplib. In these cases it may come in handy to have an HTTP server running locally which behaves just like the real thing. Well, look no further! WWW: https://bitbucket.org/pytest-dev/pytest-localserver/ --- devel/Makefile | 1 + devel/py-pytest-localserver/Makefile | 29 +++++++++++++++++++++++++++ devel/py-pytest-localserver/distinfo | 2 ++ devel/py-pytest-localserver/pkg-descr | 10 +++++++++ 4 files changed, 42 insertions(+) create mode 100644 devel/py-pytest-localserver/Makefile create mode 100644 devel/py-pytest-localserver/distinfo create mode 100644 devel/py-pytest-localserver/pkg-descr diff --git a/devel/Makefile b/devel/Makefile index b33ed08bd569..391f2e44fc3d 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -4264,6 +4264,7 @@ SUBDIR += py-pytest SUBDIR += py-pytest-cache SUBDIR += py-pytest-capturelog + SUBDIR += py-pytest-localserver SUBDIR += py-pytest-runner SUBDIR += py-pytest-timeout SUBDIR += py-pytest-xdist diff --git a/devel/py-pytest-localserver/Makefile b/devel/py-pytest-localserver/Makefile new file mode 100644 index 000000000000..a3b81a0f05c3 --- /dev/null +++ b/devel/py-pytest-localserver/Makefile @@ -0,0 +1,29 @@ +# Created by: Kubilay Kocak +# $FreeBSD$ + +PORTNAME= pytest-localserver +PORTVERSION= 0.3.5 +CATEGORIES= devel python +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= koobs@FreeBSD.org +COMMENT= Py.test Plugin to test server connections locally + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>0:${PORTSDIR}/devel/py-pytest \ + ${PYTHON_PKGNAMEPREFIX}werkzeug>=0.10:${PORTSDIR}/www/py-werkzeug +TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}six>0:${PORTSDIR}/devel/py-six \ + ${PYTHON_PKGNAMEPREFIX}requests>0:${PORTSDIR}/www/py-requests + +USES= python +USE_PYTHON= autoplist distutils + +NO_ARCH= yes + +do-test: + @cd ${WRKSRC} && ${PYTHON_CMD} -m pytest + +.include diff --git a/devel/py-pytest-localserver/distinfo b/devel/py-pytest-localserver/distinfo new file mode 100644 index 000000000000..d92c5411a853 --- /dev/null +++ b/devel/py-pytest-localserver/distinfo @@ -0,0 +1,2 @@ +SHA256 (pytest-localserver-0.3.5.tar.gz) = 97a8db7f530afdd009513ebdd86731b51e866fad82595bf92f456d93e5d57837 +SIZE (pytest-localserver-0.3.5.tar.gz) = 18856 diff --git a/devel/py-pytest-localserver/pkg-descr b/devel/py-pytest-localserver/pkg-descr new file mode 100644 index 000000000000..4b3dfc578b36 --- /dev/null +++ b/devel/py-pytest-localserver/pkg-descr @@ -0,0 +1,10 @@ +pytest-localserver is a plugin for the pytest testing framework which +enables you to test server connections locally. + +Sometimes monkeypatching urllib2.urlopen() just does not cut it, for +instance if you work with urllib2.Request, define your own +openers/handlers or work with httplib. In these cases it may come in +handy to have an HTTP server running locally which behaves just like +the real thing. Well, look no further! + +WWW: https://bitbucket.org/pytest-dev/pytest-localserver/