예제 #1
0
    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)
예제 #2
0
    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)
예제 #3
0
    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)
예제 #4
0
 def tearDown(self):
     ql.set_repo(_REPO)
     test_path = os.path.join(os.path.expanduser("~"), "testing")
     os.rmdir(test_path)
예제 #5
0
 def setUp(self):
     test_path = os.path.join(os.path.expanduser("~"), "testing")
     ql.set_repo(test_path)
예제 #6
0
 def tearDown(self):
     ql.set_repo(_REPO)
     os.rmdir(self.test_path)
예제 #7
0
 def setUp(self):
     self.test_path = os.path.join(os.path.expanduser("~"), "testing")
     ql.set_repo(self.test_path)
예제 #8
0
 def tearDown(self):
     ql.set_repo(_REPO)
     test_path = os.path.join(os.path.expanduser("~"), "testing")
     os.rmdir(test_path)