예제 #1
0
파일: test_utils.py 프로젝트: gruberchr/bob
    def testFile(self):
        with TemporaryDirectory() as tmp:
            fn = os.path.join(tmp, "file")
            with open(fn, "w") as f:
                f.write("data")

            emptyDirectory(tmp)
            assert os.path.exists(tmp)
            assert not os.path.exists(fn)
예제 #2
0
    def testFile(self):
        with TemporaryDirectory() as tmp:
            fn = os.path.join(tmp, "file")
            with open(fn, "w") as f:
                f.write("data")

            emptyDirectory(tmp)
            assert os.path.exists(tmp)
            assert not os.path.exists(fn)
예제 #3
0
파일: test_utils.py 프로젝트: gruberchr/bob
    def testDir(self):
        with TemporaryDirectory() as tmp:
            d = os.path.join(tmp, "dir")
            os.mkdir(d)
            with open(os.path.join(d, "file"), "w") as f:
                f.write("data")

            emptyDirectory(tmp)
            assert os.path.exists(tmp)
            assert not os.path.exists(d)
예제 #4
0
    def testDir(self):
        with TemporaryDirectory() as tmp:
            d = os.path.join(tmp, "dir")
            os.mkdir(d)
            with open(os.path.join(d, "file"), "w") as f:
                f.write("data")

            emptyDirectory(tmp)
            assert os.path.exists(tmp)
            assert not os.path.exists(d)
예제 #5
0
 def testNonExisting(self):
     emptyDirectory(self.repodir)
     s = self.statusCvsScm()
     self.assertEqual(s.flags, {ScmTaint.error})
     self.assertTrue(s.error)
예제 #6
0
 def testNonExisting(self):
     emptyDirectory(self.repodir_local)
     s = self.statusSvnScm()
     self.assertEqual(s.flags, {ScmTaint.error})
     self.assertTrue(s.error)