Created attachment 144564 [details] fix-tests-py-nose.patch regression-test fails because build_tests isn't run and because the expected output is not formatted correctly. Will see about upstreaming it, when I have more time.
Assign to maintainer. nivit@ I can take this if you like. Melvyn, `test` is the standard test command for Python packages, and I've tested it's use locally instead of build_tests, and it works: - @cd ${WRKSRC} && ${PYTHON_CMD} selftest.py + @cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test Having as many Python ports as possible use that target will help when we add these as the default test mechanism to the Python ports framework bits. While you're here patching nose, I can see it needs: - LICENSE_FILE - #Python3 ready comment removed - A minor patch to setup.py for the nosetests.1 man page (would be cool if this wasnt needed) Can you give these a go too along with an updated patch for tests? :)
Sure, I can do that.
Assign to koobs@, who want to take the mantainership of this port.
Updated patch pending
Created attachment 145031 [details] Updated patch incorporating feedback. Updated patch: - build_tests only needed for python 3 (see setup3lib.py) - use PYDISTUTILS_SETUP - use standard test command for PYDISTUTILS_SETUP
Thanks Melvyn, I was just about to commit a nose 1.3.3 update when I saw your updated patch come in. Why is it necessary to add PYTHON_REL bits to Makefile when setup.py checks for and imports setup3lib, which then runs self.run_command('build_tests') ? From my reading running build_tests is only necessary if executing the tests via selftests.py rather than the setuptools test command. I see the following running regression-test under Python 3.4: ===> py34-nose-1.3.3 depends on file: /usr/local/bin/python3.4 - found running test running build_tests Granted the tests fail miserably.
A commit references this bug: Author: koobs Date: Sun Jul 27 15:22:36 UTC 2014 New revision: 363074 URL: http://svnweb.freebsd.org/changeset/ports/363074 Log: devel/py-nose: Update to 1.3.3, Fix tests - Update to 1.3.3 - Add LICENSE_FILE - Remove Python3 ready comment - Fix tests under Python 3.x - Remove patch to comment out man file installation PR: 191795 Submitted by: Melvyn Sopacua <melvyn at magemana dot nl> Changes: head/devel/py-nose/Makefile head/devel/py-nose/distinfo head/devel/py-nose/files/
I've skipped the patches to test_config_defaults.rst since they don't seem to be affecting the 2 failing tests under Python 3.x Ran 384 tests in 41.317s - FAILED (SKIP=10, failures=2) See attached test log for details
Created attachment 145033 [details] nose 1.3.3 test output (2 failing tests)
I added it cause build_tests wouldn't work under 2.x. I failed to check if build_tests was still needed on 3.x with the new invocation. The two failing tests you uploaded are unrelated to the patch I provided for the previous version. Perhaps stuff got fixed already in 1.3.3. Those two failures are likely related to sysvsem stuff or perhaps bash being a (hidden) test dependency. I haven't looked into the details.
I took your changes after investigating further, thank you for looking into it. Longer term it would be great to get tests working for Python 2.x and 3.x invoked via the `test` command without special treatment. This is left as an upstream exercise :)