On Wed, Dec 23, 2015 at 09:21:43PM +0100, Jérémie Courrèges-Anglas wrote: > Daniel Jakots <vigdis+o...@chown.me> writes: > > > On Wed, 23 Dec 2015 23:49:11 +0500, Alexandr Shadchin > > <alexandr.shadc...@gmail.com> wrote: > > > >> Hi, > >> > >> This diff updates py-mock to the latest release. > >> Add python3 flavor. > >> > >> Comments ? OK ? > >> > > > > I was working on it too (as I need it for another port) and I have > > quite the same diff. A comment inline, otherwise that's good :) > > > >> > >> Index: Makefile > >> =================================================================== > >> RCS file: /cvs/ports/devel/py-mock/Makefile,v > >> retrieving revision 1.7 > >> diff -u -p -r1.7 Makefile > >> --- Makefile 29 Sep 2015 10:51:54 -0000 1.7 > >> +++ Makefile 23 Dec 2015 18:44:30 -0000 > >> @@ -2,11 +2,10 @@ > > > > [snip] > > > >> +NO_TEST = Yes > > > > Any reason for that? It looks like that test works. > > The test suite isn't called. Needs a test-dep on devel/py-unittest2 and > a custom do-test target, eg. cd ${WRKSRC} && unit2 discover. There are > 6 errors that were not present before. >
Errors due to the old py-unittest2. > Also devel/flake8's tests fail with this update, but I'm not sure > whether my-mock is to blame. > Fix flake8 attached (also works fine with py-mock 1.0.1) > -- > jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE > -- Alexandr Shadchin Index: Makefile =================================================================== RCS file: /cvs/ports/devel/flake8/Makefile,v retrieving revision 1.3 diff -u -p -r1.3 Makefile --- Makefile 29 Sep 2015 10:51:43 -0000 1.3 +++ Makefile 24 Dec 2015 10:13:45 -0000 @@ -4,7 +4,7 @@ COMMENT = modular python code checker w MODPY_EGG_VERSION = 2.2.5 DISTNAME = flake8-${MODPY_EGG_VERSION} -REVISION = 0 +REVISION = 1 CATEGORIES = devel @@ -12,7 +12,7 @@ HOMEPAGE = https://bitbucket.org/tarek/ MAINTAINER = Bertrand Janin <b...@janin.com> -# MIT +# MIT PERMIT_PACKAGE_CDROM = Yes MODPY_PI = Yes @@ -21,7 +21,7 @@ MODULES = lang/python MODPY_SETUPTOOLS = Yes -TEST_DEPENDS = devel/py-unittest2 \ +TEST_DEPENDS = ${RUN_DEPENDS} \ devel/py-mock RUN_DEPENDS = devel/pep8 \ @@ -29,6 +29,6 @@ RUN_DEPENDS = devel/pep8 \ devel/pyflakes do-test: - cd ${WRKSRC} && unit2 discover + cd ${WRKSRC} && ${MODPY_BIN} -m unittest discover .include <bsd.port.mk> Index: patches/patch-flake8_tests_test_engine_py =================================================================== RCS file: patches/patch-flake8_tests_test_engine_py diff -N patches/patch-flake8_tests_test_engine_py --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-flake8_tests_test_engine_py 24 Dec 2015 10:13:45 -0000 @@ -0,0 +1,30 @@ +$OpenBSD$ +--- flake8/tests/test_engine.py.orig Sat Sep 13 20:16:36 2014 ++++ flake8/tests/test_engine.py Thu Dec 24 15:06:46 2015 +@@ -50,7 +50,7 @@ class TestEngine(unittest.TestCase): + self.assertTrue(len(registered_exts[0]) > 0) + for i in registered_exts[1:]: + self.assertTrue(isinstance(i, list)) +- register_check.assert_called() ++ self.assertTrue(register_check.called) + + def test_get_parser(self): + # setup +@@ -64,13 +64,13 @@ class TestEngine(unittest.TestCase): + # actual call we're testing + parser, hooks = engine.get_parser() + # assertions +- re.assert_called() +- gpv.assert_called() ++ self.assertTrue(re.called) ++ self.assertTrue(gpv.called) + pgp.assert_called_once_with( + 'flake8', + '%s (pyflakes: 0.7, mccabe: 0.2) Python Version' % __version__) +- m.remove_option.assert_called() +- m.add_option.assert_called() ++ self.assertTrue(m.remove_option.called) ++ self.assertTrue(m.add_option.called) + self.assertEqual(parser, m) + self.assertEqual(hooks, []) + # clean-up