~testtools-dev/testtools/trunk

« back to all changes in this revision

Viewing changes to testtools/tests/test_helpers.py

  • Committer: Jonathan Lange
  • Date: 2011-07-31 13:42:26 UTC
  • mfrom: (219.2.2 clarify-fixtures-dep)
  • Revision ID: jml@canonical.com-20110731134226-s0vi8z9zklpo37oz
Don't depend on fixtures to run the tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
    hide_testtools_stack,
17
17
    is_stack_hidden,
18
18
    safe_hasattr,
19
 
    StackHidingFixture,
20
19
    )
21
20
 
22
21
 
232
231
        hide_testtools_stack(False)
233
232
        self.assertThat(self.modules, StackHidden(False))
234
233
 
235
 
    def test_fixture(self):
236
 
        current_state = is_stack_hidden()
237
 
        fixture = StackHidingFixture(not current_state)
238
 
        fixture.setUp()
239
 
        try:
240
 
            self.assertThat(self.modules, StackHidden(not current_state))
241
 
        finally:
242
 
            fixture.cleanUp()
243
 
        self.assertThat(self.modules, StackHidden(current_state))
244
 
 
245
234
 
246
235
def test_suite():
247
236
    from unittest import TestLoader