mirror of
https://git.freebsd.org/ports.git
synced 2025-07-15 16:29:15 -04:00
This port is still of value. The built-in unittest in Python 2.7 is missing features provided by unittest2 which backports from Python 3.x. Example code which produces a failure with 2.7's built-in unittest: import unittest2 import unittest class ExampleUT(unittest.TestCase): def test_unittest(self): for i in [1, 2, 3]: with self.subTest(i=i): self.assertEqual(i, i) class ExampleUT2(unittest2.TestCase): def test_unittest2(self): for i in [1, 2, 3]: with self.subTest(i=i): self.assertEqual(i, i) if __name__ == '__main__': unittest2.main()
28 lines
750 B
Makefile
28 lines
750 B
Makefile
# $FreeBSD$
|
|
|
|
PORTNAME= unittest2
|
|
PORTVERSION= 1.1.0
|
|
CATEGORIES= devel python
|
|
MASTER_SITES= CHEESESHOP
|
|
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
|
|
|
MAINTAINER= feld@FreeBSD.org
|
|
COMMENT= New features in unittest backported to Python 2
|
|
|
|
LICENSE= BSD3CLAUSE
|
|
|
|
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}linecache2>0:devel/py-linecache2 \
|
|
${PYTHON_PKGNAMEPREFIX}six>0:devel/py-six \
|
|
${PYTHON_PKGNAMEPREFIX}traceback2>0:devel/py-traceback2
|
|
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}linecache2>0:devel/py-linecache2 \
|
|
${PYTHON_PKGNAMEPREFIX}six>0:devel/py-six \
|
|
${PYTHON_PKGNAMEPREFIX}traceback2>0:devel/py-traceback2
|
|
|
|
USES= python
|
|
USE_PYTHON= autoplist distutils
|
|
|
|
post-patch:
|
|
@${REINPLACE_CMD} -e "s|'argparse', ||" \
|
|
${WRKSRC}/setup.py
|
|
|
|
.include <bsd.port.mk>
|