def testEnable(self): location.add(_LOCATION_DIR, False) location.enable(_LOCATION_DIR) self.failUnless(_MODELS_DIR in models.__path__) self.failUnless(_TESTSTEPS_DIR in teststeps.__path__) self.failUnless(_TESTCASES_DIR in testcases.__path__) self.failUnless(_TESTSUITES_DIR in testsuites.__path__) try: __import__("tadek.models.model1") __import__("tadek.teststeps.stepspkg1.stepsmdl12") __import__("tadek.testcases.casespkg2.casesmdl21") __import__("tadek.testsuites.suitespkg1.suitesmdl11") except ImportError: self.failIf(True)
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()
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()