Opened 12 years ago

Closed 11 years ago

#2825 closed enhancement (fixed)

Add ability to add extra test suites

Reported by: ignem@… Owned by: Adrian Holovaty
Component: Testing framework Version: master
Severity: minor Keywords:
Cc: gary.wilson@… Triage Stage: Design decision needed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


I have objects outside '' that have document strings that I want to use in doctests.
The default TEST_RUNNER has no way of adding them to the tests.

One way to fix this is to have a function in each module's '' file that returns a test suite that is added to the other tests.
The test runner has to call this function (if it exists) and add the returned suite to the other tests. This would be done in the 'build_suite' function, right after adding doctests in ''.

Example of function:

    def test_suite():
        import extra_module
        suite = unittest.TestSuite()
        return suite

Change History (4)

comment:1 Changed 12 years ago by Adrian Holovaty

Summary: Ability to add extra test suites wanted.Add ability to add extra test suites

Changed summary to match our style.

comment:2 Changed 11 years ago by Simon G. <dev@…>

Triage Stage: UnreviewedDesign decision needed

comment:3 Changed 11 years ago by Gary Wilson <gary.wilson@…>

Cc: gary.wilson@… added

comment:4 Changed 11 years ago by Russell Keith-Magee

Resolution: fixed
Status: newclosed

This functionality was added in [5729] in response to #3782. The approach suggested in that ticket was more consistent with Python recommended practice.

Note: See TracTickets for help on using tickets.
Back to Top