def main(): """Improvement over unittest.main().""" fix_encoding.fix_encoding() logging.basicConfig( level=logging.DEBUG if '-v' in sys.argv else logging.ERROR, format='%(levelname)5s %(filename)15s(%(lineno)3d): %(message)s') if '-v' in sys.argv: unittest.TestCase.maxDiff = None # Use an unusual umask. os.umask(0070) fs.chdir(TESTS_DIR) unittest.main()
def setUp(self): super(SymlinkTest, self).setUp() self.old_cwd = six.text_type(os.getcwd()) self.cwd = tempfile.mkdtemp(prefix=u'isolate_') # Everything should work even from another directory. fs.chdir(self.cwd)
def tearDown(self): try: fs.chdir(self.old_cwd) file_path.rmtree(self.cwd) finally: super(SymlinkTest, self).tearDown()
def setup(): fix_encoding.fix_encoding() # Use an unusual umask. os.umask(0o070) fs.chdir(TESTS_DIR)