Exemple #1
0
 def testRemove(self):
     self.testAdd()
     location.remove(_LOCATION_DIR)
     self.failIf(_MODELS_DIR in models.__path__)
     self.failIf(_TESTSTEPS_DIR in teststeps.__path__)
     self.failIf(_TESTCASES_DIR in testcases.__path__)
     self.failIf(_TESTSUITES_DIR in testsuites.__path__)
     try:
         __import__("tadek.models.model1")
     except ImportError:
         pass
     else:
         self.failIf(True)
     try:
         __import__("tadek.teststeps.stepspkg2.stepsmdl21")
     except ImportError:
         pass
     else:
         self.failIf(True)
     try:
         __import__("tadek.testcases.casespkg1.casesmdl11")
     except ImportError:
         pass
     else:
         self.failIf(True)
     try:
         __import__("tadek.testsuites.suitespkg2.suitesmdl22")
     except ImportError:
         pass
     else:
         self.failIf(True)
Exemple #2
0
 def testRemove(self):
     self.testAdd()
     location.remove(_LOCATION_DIR)
     self.failIf(_MODELS_DIR in models.__path__)
     self.failIf(_TESTSTEPS_DIR in teststeps.__path__)
     self.failIf(_TESTCASES_DIR in testcases.__path__)
     self.failIf(_TESTSUITES_DIR in testsuites.__path__)
     try:
         __import__("tadek.models.model1")
     except ImportError:
         pass
     else:
         self.failIf(True)
     try:
         __import__("tadek.teststeps.stepspkg2.stepsmdl21")
     except ImportError:
         pass
     else:
         self.failIf(True)
     try:
         __import__("tadek.testcases.casespkg1.casesmdl11")
     except ImportError:
         pass
     else:
         self.failIf(True)
     try:
         __import__("tadek.testsuites.suitespkg2.suitesmdl22")
     except ImportError:
         pass
     else:
         self.failIf(True)
Exemple #3
0
 def removeLocation(self):
     '''
     Removes selected items from locations tree and refreshes
     the tests tree.
     '''
     items = self._locsTree.selectedItems()
     if not (items and runQuestion(
             "Are you sure you want to remove %s?\n\n %s" %
         ("these locations" if len(items) > 1 else "this location",
          "\n".join(item.text(0) for item in items)))):
         return
     for item in items:
         path = item.text(0)
         log.debug("Removing test path '%s'" % path)
         location.remove(path)
         self._locsTree.takeTopLevelItem(
             self._locsTree.indexOfTopLevelItem(item))
         self._locItems.pop(path)
     self.refresh()
Exemple #4
0
 def removeLocation(self):
     '''
     Removes selected items from locations tree and refreshes
     the tests tree.
     '''
     items = self._locsTree.selectedItems()
     if not (items and 
             runQuestion("Are you sure you want to remove %s?\n\n %s"
                         % ("these locations" if len(items) > 1
                                              else "this location",
                            "\n".join(item.text(0) for item in items)))):
         return
     for item in items:
         path = item.text(0)
         log.debug("Removing test path '%s'" % path)
         location.remove(path)
         self._locsTree.takeTopLevelItem(
             self._locsTree.indexOfTopLevelItem(item))
         self._locItems.pop(path)
     self.refresh()
Exemple #5
0
 def tearDown(self):
     location.remove(_LOCATION_DIR)
Exemple #6
0
 def tearDown(self):
     location.remove(_LOCATION_DIR)