Chromium Code Reviews| Index: tests/trial_dir.py |
| diff --git a/tests/trial_dir.py b/tests/trial_dir.py |
| index 975a775883142af0130c2c0bd24e88ec2b3b6df0..7ba0633cee3a553a58f8d9305bac7219eec6eb80 100644 |
| --- a/tests/trial_dir.py |
| +++ b/tests/trial_dir.py |
| @@ -65,8 +65,8 @@ class TrialDir(object): |
| logging.error('Leaking %s' % TrialDir.TRIAL_ROOT) |
| -class TestCase(unittest.TestCase): |
| - """Base unittest class that cleans off a trial directory in tearDown().""" |
| +class TrialDirMixIn(object): |
| + """Stand alone mixin.""" |
|
Dirk Pranke
2011/06/14 06:22:09
This comment doesn't tell me anything about what t
|
| def setUp(self): |
| # Create a specific directory just for the test. |
| self.trial = TrialDir(self.id()) |
| @@ -80,6 +80,17 @@ class TestCase(unittest.TestCase): |
| return self.trial.root_dir |
| +class TestCase(unittest.TestCase, TrialDirMixIn): |
| + """Base unittest class that cleans off a trial directory in tearDown().""" |
| + def setUp(self): |
| + unittest.TestCase.setUp(self) |
| + TrialDirMixIn.setUp(self) |
| + |
| + def tearDown(self): |
| + TrialDirMixIn.tearDown(self) |
| + unittest.TestCase.tearDown(self) |
| + |
| + |
| if '-l' in sys.argv: |
| # See SHOULD_LEAK definition in TrialDir for its purpose. |
| TrialDir.SHOULD_LEAK = True |