
generally useful non-testing facilities. Since extras has been around for a couple of testtools releases now, we're making this into a hard dependency of testtools. (Robert Collins) * Testtools now uses setuptools rather than distutils so that we can document the extras dependency. (Robert Collins)
31 lines
811 B
Python
31 lines
811 B
Python
# Copyright (c) 2010-2012 testtools developers. See LICENSE for details.
|
|
|
|
from testtools import TestCase
|
|
from testtools.tests.helpers import (
|
|
FullStackRunTest,
|
|
hide_testtools_stack,
|
|
is_stack_hidden,
|
|
)
|
|
|
|
|
|
class TestStackHiding(TestCase):
|
|
|
|
run_tests_with = FullStackRunTest
|
|
|
|
def setUp(self):
|
|
super(TestStackHiding, self).setUp()
|
|
self.addCleanup(hide_testtools_stack, is_stack_hidden())
|
|
|
|
def test_is_stack_hidden_consistent_true(self):
|
|
hide_testtools_stack(True)
|
|
self.assertEqual(True, is_stack_hidden())
|
|
|
|
def test_is_stack_hidden_consistent_false(self):
|
|
hide_testtools_stack(False)
|
|
self.assertEqual(False, is_stack_hidden())
|
|
|
|
|
|
def test_suite():
|
|
from unittest import TestLoader
|
|
return TestLoader().loadTestsFromName(__name__)
|