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
Add decorator for tests not yet implemented #63796
Comments
Some tests in the test suite are not implemented for one reason or another, and most of these are defined simply as "def test_thats_not_implemented(self): pass", possibly with a comment meant to be a reminder to implement it. This patch adds a decorator to test.support which turns the non-test into an expected failure with a docstring. This means that when run in verbose mode, instead of showing: """ it will instead show: """ This should make it more obvious that such a test needs some work. The patch also applies the decorator in test_minidom as an example; there are a few other places that could use it as well. |
This patch takes the idea a little further, adding a command line option to regrtest, '--failnoimpl' (it could use a better name). With this option specified any test decorated by support.not_implemented will not be marked as an expected failure, allowing the NotImplementedError exception to fail the test. The default under regrtest is to expect the failure, but the default for running a test file directly is to fail loudly. The idea is just to make it more obvious when a test is just in need of implementation, and could make it easier for new contributors to find something that needs doing. |
I don't think a new option for regrtest is necessary. |
Indeed, this doesn't sound like a terrific idea to me. |
There are a couple in pickletester, one in test_io, a few in test_reprlib, and the ones in the patch from test_minidom; some 10 test methods in total that I've found and remembered. I suppose with that few, it would be best to just open issues for each test module and have them implemented. Most of them will be getting explicit skips as part of bpo-19572 anyway. This would tend to make it easier to get away with checking in new unimplemented tests, which isn't really a good thing. Closing as rejected. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: