/usr/lib/python2.7/dist-packages/testtools/tests/test_helpers.py is in python-testtools 0.9.39-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | # 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__)
|