Esempio n. 1
0
 def testPurgeUntrackedFile(self):
     clone(self.repodir, self.wc)
     fileToPurge = os.path.join(self.wc, 'fileToPurge')
     with file(fileToPurge, 'a') as f:
         f.write('purgeme')
     purge(self.wc)
     self.assertFalse(os.path.exists(fileToPurge))
 def testPurgeUntrackedFile(self):
     clone(self.repodir, self.wc)
     fileToPurge = os.path.join(self.wc, 'fileToPurge')
     with file(fileToPurge, 'a') as f:
         f.write('purgeme')
     purge(self.wc)
     self.assertFalse(os.path.exists(fileToPurge))
Esempio n. 3
0
 def testPurgeUntrackedFile(self):
     clone(self.repodir, self.wc)
     fileToPurge = os.path.join(self.wc, "fileToPurge")
     with file(fileToPurge, "a") as f:
         f.write("purgeme")
     purge(self.wc)
     self.assertFalse(os.path.exists(fileToPurge))
Esempio n. 4
0
 def testPurgeTrackedFile(self):
     clone(self.repodir, self.wc)
     fileToModify = os.path.join(self.wc, 'hello.txt')
     with open(fileToModify, 'w') as f:
         f.write('hello!')
     purge(self.wc)
     with open(fileToModify, 'r') as f:
         content = f.read()
     self.assertEqual(content, 'hello!')
 def testPurgeTrackedFile(self):
     clone(self.repodir, self.wc)
     fileToModify = os.path.join(self.wc, 'hello.txt')
     with open(fileToModify, 'w') as f:
         f.write('hello!')
     purge(self.wc)
     with open(fileToModify, 'r') as f:
         content = f.read()
     self.assertEqual(content, 'hello!')
Esempio n. 6
0
 def testPurgeTrackedFile(self):
     clone(self.repodir, self.wc)
     fileToModify = os.path.join(self.wc, "hello.txt")
     with open(fileToModify, "w") as f:
         f.write("hello!")
     purge(self.wc)
     with open(fileToModify, "r") as f:
         content = f.read()
     self.assertEqual(content, "hello!")
Esempio n. 7
0
 def testPurgeVeryLongPath(self):
     clone(self.repodir, self.wc)
     # now create a very long path name
     longPath = self.wc
     for new_dir in xrange(1, 64):
         longPath = os.path.join(longPath, str(new_dir))
     os.makedirs(longPath)
     self.assertTrue(os.path.isdir(longPath))
     purge(self.wc)
     self.assertFalse(os.path.isdir(longPath))
 def testPurgeVeryLongPath(self):
     clone(self.repodir, self.wc)
     # now create a very long path name
     longPath = self.wc
     for new_dir in xrange(1, 64):
         longPath = os.path.join(longPath, str(new_dir))
     os.makedirs(longPath)
     self.assertTrue(os.path.isdir(longPath))
     purge(self.wc)
     self.assertFalse(os.path.isdir(longPath))
Esempio n. 9
0
 def testPurgeAFreshClone(self):
     clone(self.repodir, self.wc)
     purge(self.wc)
     self.assertTrue(os.path.exists(os.path.join(self.wc, 'hello.txt')))
Esempio n. 10
0
 def testPurgeUntrackedDirectory(self):
     clone(self.repodir, self.wc)
     directoryToPurge = os.path.join(self.wc, 'directoryTopPurge')
     os.makedirs(directoryToPurge)
     purge(directoryToPurge)
     self.assertFalse(os.path.isdir(directoryToPurge))
 def testPurgeAFreshClone(self):
     clone(self.repodir, self.wc)
     purge(self.wc)
     self.assertTrue(os.path.exists(os.path.join(self.wc, 'hello.txt')))
 def testPurgeUntrackedDirectory(self):
     clone(self.repodir, self.wc)
     directoryToPurge = os.path.join(self.wc, 'directoryTopPurge')
     os.makedirs(directoryToPurge)
     purge(directoryToPurge)
     self.assertFalse(os.path.isdir(directoryToPurge))