Beispiel #1
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)
Beispiel #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)
Beispiel #3
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)
Beispiel #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)
Beispiel #5
0
 def testNonExisting(self):
     emptyDirectory(self.repodir)
     s = self.statusCvsScm()
     self.assertEqual(s.flags, {ScmTaint.error})
     self.assertTrue(s.error)
 def testNonExisting(self):
     emptyDirectory(self.repodir_local)
     s = self.statusSvnScm()
     self.assertEqual(s.flags, {ScmTaint.error})
     self.assertTrue(s.error)