How to use the unittest2.util.strclass function in unittest2

To help you get started, we’ve selected a few unittest2 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github RuleWorld / bionetgen / bng2 / SBMLparser / pyinstaller2 / PyInstaller / lib / unittest2 / suite.py View on Github external
if getattr(previousClass, '_classSetupFailed', False):
            return
        if getattr(result, '_moduleSetUpFailed', False):
            return
        if getattr(previousClass, "__unittest_skip__", False):
            return

        tearDownClass = getattr(previousClass, 'tearDownClass', None)
        if tearDownClass is not None:
            try:
                tearDownClass()
            except Exception:
                e = sys.exc_info()[1]
                if isinstance(result, _DebugResult):
                    raise
                className = util.strclass(previousClass)
                errorName = 'tearDownClass (%s)' % className
                self._addClassOrModuleLevelException(result, e, errorName)
github RuleWorld / bionetgen / bng2 / SBMLparser / pyinstaller2 / PyInstaller / lib / unittest2 / result.py View on Github external
def __repr__(self):
        return "<%s run=%i errors=%i failures=%i>" % \
               (util.strclass(self.__class__), self.testsRun, len(self.errors),
                len(self.failures))
github RuleWorld / bionetgen / bng2 / SBMLparser / pyinstaller2 / PyInstaller / lib / unittest2 / case.py View on Github external
def __str__(self):
        return "%s (%s)" % (self._testMethodName, strclass(self.__class__))
github lanl / scout / llvm / tools / lldb / third_party / Python / module / unittest2 / unittest2 / case.py View on Github external
def __str__(self):
        return "%s (%s)" % (self._testMethodName, strclass(self.__class__))
github openbsd / src / gnu / llvm / tools / lldb / third_party / Python / module / unittest2 / unittest2 / result.py View on Github external
def __repr__(self):
        return "<%s run=%i errors=%i failures=%i>" % \
               (util.strclass(self.__class__), self.testsRun, len(self.errors),
                len(self.failures))
github apple / swift-lldb / third_party / Python / module / unittest2 / unittest2 / suite.py View on Github external
def __repr__(self):
        return "<%s tests=%s>" % (util.strclass(self.__class__), list(self))
github machawk1 / wail / build / pyinstaller-2.0 / PyInstaller / lib / unittest2 / suite.py View on Github external
return
        if getattr(previousClass, '_classSetupFailed', False):
            return
        if getattr(result, '_moduleSetUpFailed', False):
            return
        if getattr(previousClass, "__unittest_skip__", False):
            return
        
        tearDownClass = getattr(previousClass, 'tearDownClass', None)
        if tearDownClass is not None:
            try:
                tearDownClass()
            except Exception, e:
                if isinstance(result, _DebugResult):
                    raise
                className = util.strclass(previousClass)
                errorName = 'tearDownClass (%s)' % className
                self._addClassOrModuleLevelException(result, e, errorName)
github GNOME / tracker / tests / functional-tests / unittest2 / suite.py View on Github external
def _addClassTearDownError(self, result):
        className = util.strclass(result._previousTestClass)
        error = _ErrorHolder('classTearDown (%s)' % className)
        result.addError(error, sys.exc_info())
github machawk1 / wail / build / pyinstaller-2.0 / PyInstaller / lib / unittest2 / suite.py View on Github external
try:
            currentClass._classSetupFailed = False
        except TypeError:
            # test may actually be a function
            # so its class will be a builtin-type
            pass
            
        setUpClass = getattr(currentClass, 'setUpClass', None)
        if setUpClass is not None:
            try:
                setUpClass()
            except Exception, e:
                if isinstance(result, _DebugResult):
                    raise
                currentClass._classSetupFailed = True
                className = util.strclass(currentClass)
                errorName = 'setUpClass (%s)' % className
                self._addClassOrModuleLevelException(result, e, errorName)