-
Notifications
You must be signed in to change notification settings - Fork 395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support 'test_suite' function convention from Zope #17
Comments
Here's a fix, with tests, for this issue. Google Code Info: |
I think it would be a great idea to support this convention, but not in the core of I'm rejecting the current patch. If you'd like to put the same functionality into a The keys to making it work as a plugin will be to implement wantModule to reject Google Code Info: |
While I disagree that it's a backwards-incompatible change, I agree that it's new The patch does not change behaviour unless you have a test_suite() function I would go as far as calling it a bugfix, as for the cited example [1] nose does [1] Anyway, I will give it a try at making this a plugin. My question is, if the plugin is optional, it won't get called if I use Google Code Info: |
What makes it backwards-incompatible is the unknown number of users who have tests def test_suite(): who are expecting those to be collected and run as normal tests, not to have special The plugin can still work no matter how nose is called (nosetests or through the [nosetests] And the plugin would always be enabled. Google Code Info: |
I could do this, does anyone still care? Google Code Info: |
I would love this addition. I suspect many others who currently use the Google Code Info: |
This is my first time contributing so please correct me if I'm doing something wrong. I have a diff that I think completes the objective but I can't get the plugin to install by default for some reason. Maybe someone here can help me with that. Google Code Info: |
(Some of the comments aren't useful; I was experimenting with them to see if they mattered). Google Code Info: |
Many Zope developers are used to the 'test_suite function' convention from
Zope, so you can find several packages in PyPI that have all sorts of
styles of tests from unittest to doctest and use the test_suite convention.
An example here:
http://svn.plone.org/svn/plone/plone.i18n/trunk/plone/i18n/normalizer/tests
/test_normalizer.py
In cases like this, nose should by default ignore anything but
the 'test_suite' function, and call the test_suite function to get a
unittest.TestSuite instance back with the tests for that module.
If time permits I will prototype this as a nose plugin, but would be a
nice-to-have feature, specially if we could use the 'nose.collector'
setuptools test_suite shortcut to run tests on that package for example.
Google Code Info:
Issue #: 102
Author: [email protected]
Created On: 2007-09-24T21:19:10.000Z
Closed On:
The text was updated successfully, but these errors were encountered: