Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python -E
- import unittest
- import os
- import sys
- class TestSequense(unittest.TestCase):
- pass
- def test_dir_exists(dir):
- def test(self):
- try:
- self.assertTrue(os.path.isdir(dir),"ERROR: " + dir + " is not a directory")
- except Exception as e:
- print(e)
- return test
- if __name__ == '__main__':
- test = test_dir_exists("/something/not/set/correctly")
- setattr(TestSequense, "test_path", test)
- #TODO trying remove unnecessary traceback info... still not working
- sys.tracebacklimit = 0
- unittest.main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement