コード例 #1
0
ファイル: basetestcase.py プロジェクト: EE-NovRain/nova
    def tearDown(self):
        super(BaseTestCase, self).tearDown()

        has_errors = len([test for (test, msgs) in self._currentResult.errors
            if test.id() == self.id()]) > 0
        failed = len([test for (test, msgs) in self._currentResult.failures
            if test.id() == self.id()]) > 0

        if not has_errors and not failed:
            self._save_mock_proxies()
コード例 #2
0
ファイル: basetestcase.py プロジェクト: stuartbyma/nova
    def tearDown(self):
        super(BaseTestCase, self).tearDown()

        has_errors = len([
            test for (test, msgs) in self._currentResult.errors
            if test.id() == self.id()
        ]) > 0
        failed = len([
            test for (test, msgs) in self._currentResult.failures
            if test.id() == self.id()
        ]) > 0

        if not has_errors and not failed:
            self._save_mock_proxies()
コード例 #3
0
ファイル: basetestcase.py プロジェクト: Karamax/nova
    def tearDown(self):
        super(BaseTestCase, self).tearDown()

        # python-subunit will wrap test results with a decorator.
        # Need to access the decorated member of results to get the
        # actual test result when using python-subunit.
        if hasattr(self._currentResult, 'decorated'):
            result = self._currentResult.decorated
        else:
            result = self._currentResult
        has_errors = len([test for (test, msgs) in result.errors
            if test.id() == self.id()]) > 0
        failed = len([test for (test, msgs) in result.failures
            if test.id() == self.id()]) > 0

        if not has_errors and not failed:
            self._save_mock_proxies()
コード例 #4
0
ファイル: basetestcase.py プロジェクト: bopopescu/zknova
    def tearDown(self):
        super(BaseTestCase, self).tearDown()

        # python-subunit will wrap test results with a decorator.
        # Need to access the decorated member of results to get the
        # actual test result when using python-subunit.
        if hasattr(self._currentResult, 'decorated'):
            result = self._currentResult.decorated
        else:
            result = self._currentResult
        has_errors = len(
            [test
             for (test, msgs) in result.errors if test.id() == self.id()]) > 0
        failed = len([
            test for (test, msgs) in result.failures if test.id() == self.id()
        ]) > 0

        if not has_errors and not failed:
            self._save_mock_proxies()