Exemple #1
0
 def testDisable(self):
     location.add(_LOCATION_DIR)
     location.disable(_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 testDisable(self):
     location.add(_LOCATION_DIR)
     location.disable(_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 _updateLocations(self, item, column):
     '''
     Enables or disables a location and refreshes the tests tree.
     '''
     if item.checkState(0) == QtCore.Qt.Checked:
         errors = location.enable(item.text(0))
         if errors:
             if self._loaded:
                 dialog = LoadingErrorDialog("Errors occurred while enabling"
                                             " a location", errors)
                 dialog.run()
             item.setCheckState(0, QtCore.Qt.Unchecked)
             return
     else:
         location.disable(item.text(0))
     self.refresh()
Exemple #4
0
 def _updateLocations(self, item, column):
     '''
     Enables or disables a location and refreshes the tests tree.
     '''
     if item.checkState(0) == QtCore.Qt.Checked:
         errors = location.enable(item.text(0))
         if errors:
             if self._loaded:
                 dialog = LoadingErrorDialog(
                     "Errors occurred while enabling"
                     " a location", errors)
                 dialog.run()
             item.setCheckState(0, QtCore.Qt.Unchecked)
             return
     else:
         location.disable(item.text(0))
     self.refresh()