Пример #1
0
 def test_pathExists2(self):
     try:
         tempDir = mdTestUtilities.makeTempDir()
         tempFile = mdTestUtilities.makeTempFile(tempDir)
         self.assertEquals(utilityFunctions.pathExists(tempFile, True), True, "pathExists should have returned True")
     finally:
         utilityFunctions.removeDir(tempDir)
 def test_pathExists2(self):
     try:
         tempDir = mdTestUtilities.makeTempDir()
         tempFile = mdTestUtilities.makeTempFile(tempDir)
         self.assertEquals(utilityFunctions.pathExists(tempFile, True),
                           True, "pathExists should have returned True")
     finally:
         utilityFunctions.removeDir(tempDir)
 def test_pathExists4(self):
     try:
         tempDir = mdTestUtilities.makeTempDir()
         self.assertEquals(
             utilityFunctions.pathExists(os.path.join(tempDir, "test"),
                                         True), False,
             "pathExists should have returned False")
     finally:
         utilityFunctions.removeDir(tempDir)
Пример #4
0
 def test_pathExists4(self):
     try:
         tempDir = mdTestUtilities.makeTempDir()
         self.assertEquals(
             utilityFunctions.pathExists(os.path.join(tempDir, "test"), True),
             False,
             "pathExists should have returned False",
         )
     finally:
         utilityFunctions.removeDir(tempDir)
 def test_pathExists5(self):
     try:
         tempDir = mdTestUtilities.makeTempDir()
         directory = os.path.join(tempDir, "testDir")
         os.makedirs(directory)
         mdTestUtilities.createBlankFile(os.path.join(directory, "test"))
         wrongPath = os.path.join(os.path.join(tempDir, "TeStDiR"), "test")
         self.assertEquals(utilityFunctions.pathExists(wrongPath, True),
                           False, "pathExists should have returned False")
     finally:
         utilityFunctions.removeDir(tempDir)
Пример #6
0
 def test_pathExists5(self):
     try:
         tempDir = mdTestUtilities.makeTempDir()
         directory = os.path.join(tempDir, "testDir")
         os.makedirs(directory)
         mdTestUtilities.createBlankFile(os.path.join(directory, "test"))
         wrongPath = os.path.join(os.path.join(tempDir, "TeStDiR"), "test")
         self.assertEquals(
             utilityFunctions.pathExists(wrongPath, True), False, "pathExists should have returned False"
         )
     finally:
         utilityFunctions.removeDir(tempDir)