def setUp(self): test_path = os.path.join(os.path.expanduser("~"), "testing") ql.set_repo(test_path) with open(os.path.join(ql.get_repo(), "testsuite.py"), "w") as f: code = 'print("im in the root dir")' f.write(code) subdir = os.path.join(ql.get_repo(), "test") if not os.path.exists(subdir): os.mkdir(subdir) with open(os.path.join(subdir, "testsuite.py"), "w") as f: code = 'print("im in a subdir")' f.write(code)
def setUp(self): self.test_path = os.path.join(os.path.expanduser("~"), "testing") ql.set_repo(self.test_path) with open(os.path.join(ql.get_repo(), "testsuite.py"), "w") as f: code = 'print("im in the root dir")' f.write(code) subdir = os.path.join(ql.get_repo(), "test") if not os.path.exists(subdir): os.mkdir(subdir) with open(os.path.join(subdir, "testsuite.py"), "w") as f: code = 'print("im in a subdir")' f.write(code)
def tearDown(self): for x in ("testsuite.py", "testsuite.pyc"): path = os.path.join(ql.get_repo(), x) if os.path.exists(path): os.remove(path) subdir = os.path.join(ql.get_repo(), "test") for x in ("testsuite.py", "testsuite.pyc"): path = os.path.join(subdir, x) if os.path.exists(path): os.remove(path) os.rmdir(subdir) ql.set_repo(_REPO) os.rmdir(self.test_path)
def tearDown(self): ql.set_repo(_REPO) test_path = os.path.join(os.path.expanduser("~"), "testing") os.rmdir(test_path)
def setUp(self): test_path = os.path.join(os.path.expanduser("~"), "testing") ql.set_repo(test_path)
def tearDown(self): ql.set_repo(_REPO) os.rmdir(self.test_path)
def setUp(self): self.test_path = os.path.join(os.path.expanduser("~"), "testing") ql.set_repo(self.test_path)