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 a distutils test command #52571
Comments
Add a test command in distutils, ala setuptools |
Should default to test discovery if no arguments are supplied. Valid arguments: "testrunner", "tests" or "testsuite". |
For what it's worth, I'm trying to adapt the setuptools command of the same name in a feature branch called "mbh/adding-test-command" --> http://bitbucket.org/meatballhat/distutils2/ Not sure how the roundup/<external tracker> split is usually handled, so sorry if I'm doin it wrong :-/ |
Adapting the setuptools command is a great way to start of course. Please see my note about using unittest/unittest2 test discovery as a default command if unitest2 is available and no test_suite is specified. I'm very happy to help with this. |
Should I assume that unittest2 is an installation requirement of distutils2, or is it preferable to try using unittest2 and falling back to a custom TestLoader? Sorry if I'm reading too much into this :-/ |
unittest2 is the name of the independent release of the improved unittest package in 2.7’s and 3.2’s stdlib. |
@merwok I know ;-) ... should I assume that it's an installation requirement a la
? |
Not a unittest expert, but I suspect that usual test for features will work: try: Adding Konrad to nosy, since adding new commands will be his GSoC work. (Also adjusting versions and removing the gsoc keyword that means “Issue is a good candidate for Google’s Summer of Code”, not “Issue part of an accepted GSoC project”) |
unittest2 is used for distutils2 development, but *not* a required dependency for *using* distutils2 (if I understand correctly(. Well, if there is no test runner and no test suite specified but the test command is invoked then the steps should probably be something like:
Test discovery is done with unittest(2).TestLoader.discover(...) If a specific test runner or suite is provided then distutils2 should use those and need not attempt test discovery (again - my understanding). So test discovery is a useful default if no test command is configured for a project. We may also want ways to configure that (for example allow a project to have test discovery for its test command but provide a different pattern for finding test files). |
Documentation for unittest.TestLoader.discover(...) is at: http://docs.python.org/dev/library/unittest.html#unittest.TestLoader.discover |
@mfoord thank you for the clarification! :) |
@eric: I asked for the gsoc keyword to make my work easier in bug triage. And as a matter of fact, it means that the issue part of the GSoC. |
Implemented by Konrad and merged into the main repo. |
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: