diff options
author | kali <kali@leap.se> | 2012-08-23 23:26:09 +0900 |
---|---|---|
committer | kali <kali@leap.se> | 2012-08-23 23:26:09 +0900 |
commit | 7e6ab299a8017e1ff3a63d577541ea4e6c462b44 (patch) | |
tree | a866e4611526035d80a430225add61230ee933da | |
parent | ae64232f5edbb71cbe871a7ae9c76c1839654795 (diff) |
add get_tempfile and comment to testing/basetest
-rw-r--r-- | src/leap/testing/basetest.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/leap/testing/basetest.py b/src/leap/testing/basetest.py index ccf1a76f..1ea26363 100644 --- a/src/leap/testing/basetest.py +++ b/src/leap/testing/basetest.py @@ -26,12 +26,22 @@ class BaseLeapTest(unittest.TestCase): os.environ["PATH"] = cls.old_path shutil.rmtree(cls.tempdir) + # you have to override these methods + # this way we ensure we did not put anything + # here that you can forget to call. + def setUp(self): raise NotImplementedError("abstract base class") def tearDown(self): raise NotImplementedError("abstract base class") + # + # helper methods + # + + def get_tempfile(self, filename): + return os.path.join(self.tempdir, filename) if __name__ == "__main__": unittest.main() |