mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
s4-python: Allow setting TEST_DEBUG_LEVEL to override debug level for tests.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Wed Jan 5 01:58:44 CET 2011 on sn-devel-104
This commit is contained in:
parent
733bc1c1ca
commit
e80b322077
@ -36,6 +36,16 @@ from testtools.testcase import (
|
||||
|
||||
|
||||
class TestCase(TesttoolsTestCase):
|
||||
"""A Samba test case."""
|
||||
|
||||
def setUp(self):
|
||||
super(TestCase, self).setUp()
|
||||
test_debug_level = os.getenv("TEST_DEBUG_LEVEL")
|
||||
if test_debug_level is not None:
|
||||
test_debug_level = int(test_debug_level)
|
||||
self._old_debug_level = samba.get_debug_level()
|
||||
samba.set_debug_level(test_debug_level)
|
||||
self.addCleanup(samba.set_debug_level, test_debug_level)
|
||||
|
||||
def get_loadparm(self):
|
||||
return env_loadparm()
|
||||
|
Loading…
Reference in New Issue
Block a user