Merge lp://qastaging/~tchaypo/testscenarios/testcase-mixin into lp://qastaging/~testtools-committers/testscenarios/trunk

Proposed by James Polley
Status: Merged
Merged at revision: 20
Proposed branch: lp://qastaging/~tchaypo/testscenarios/testcase-mixin
Merge into: lp://qastaging/~testtools-committers/testscenarios/trunk
Diff against target: 192 lines (+141/-4)
3 files modified
lib/testscenarios/__init__.py (+2/-1)
lib/testscenarios/testcase.py (+6/-3)
lib/testscenarios/tests/test_testcase.py (+133/-0)
To merge this branch: bzr merge lp://qastaging/~tchaypo/testscenarios/testcase-mixin
Reviewer Review Type Date Requested Status
Robert Collins Pending
Review via email: mp+95713@code.qastaging.launchpad.net

Commit message

Rename TestWithScenarios as MixableTestWithScenarios

Define new class TestWithScenarios, which mixes MixableTestWithScenarios with unittest.TestCase

If unittest2 is importable when running tests, a new class which mixes MixableTestWithScenarios with unittest2.TestCase is created and exercised.

Description of the change

Goal: allow TestWithScenarios to be mixed with any TestCase, not just unittest.TestCase

Implementation:
Rename TestWithScenarios as MixableTestWithScenarios

Define new class TestWithScenarios, which mixes MixableTestWithScenarios with unittest.TestCase

If unittest2 is importable when running tests, a new class which mixes MixableTestWithScenarios with unittest2.TestCase is created and exercised.

To post a comment you must log in.
Revision history for this message
Robert Collins (lifeless) wrote :

Ok, this is broadly fine, module the horrible horrible fact of copy in paste when in fact you want boom-tish to parameterise the tests to test with different unittest base classes.

Martin's module-parameteriser will help with that, so I'll review and merge this after that lands, which will be after testtools gets the needed support. Be a couple of days I imagine.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches