当前位置: 首页>>代码示例>>Python>>正文


Python TestResult.__init__方法代码示例

本文整理汇总了Python中unittest.TestResult.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python TestResult.__init__方法的具体用法?Python TestResult.__init__怎么用?Python TestResult.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在unittest.TestResult的用法示例。


在下文中一共展示了TestResult.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from unittest import TestResult [as 别名]
# 或者: from unittest.TestResult import __init__ [as 别名]
 def __init__(self):
     TestResult.__init__(self)
     self.start_at = time.time()
     self.testSuccess = []
     self.all_tests = {}
     self.results_log = {}
     self.note_log = []
开发者ID:simbha,项目名称:GAE-appswell,代码行数:9,代码来源:testing.py

示例2: __init__

# 需要导入模块: from unittest import TestResult [as 别名]
# 或者: from unittest.TestResult import __init__ [as 别名]
 def __init__(self, stream=sys.stdout, *args, **kwargs):
   TestResult.__init__(self)
   for arg, value in kwargs.items():
     setattr(self, arg, value)
   self.output = stream
   self.messages = TeamcityServiceMessages(self.output, prepend_linebreak=True)
   self.messages.testMatrixEntered()
   self.current_suite = None
开发者ID:ixcel4prescott,项目名称:USATodaySports,代码行数:10,代码来源:tcunittest.py

示例3: __init__

# 需要导入模块: from unittest import TestResult [as 别名]
# 或者: from unittest.TestResult import __init__ [as 别名]
 def __init__(self, comm=None):
     if comm is None:
         comm = world
     self.comm = comm
     self.outcomes = []
     self.last_errors = np.empty(self.comm.size, dtype=bool)
     self.last_failed = np.empty(self.comm.size, dtype=bool)
     TestResult.__init__(self)
开发者ID:eojons,项目名称:gpaw-scme,代码行数:10,代码来源:parunittest.py

示例4: __init__

# 需要导入模块: from unittest import TestResult [as 别名]
# 或者: from unittest.TestResult import __init__ [as 别名]
    def __init__(self, stream=sys.stdout):
        TestResult.__init__(self)

        self.output = stream
        self.test_started_datetime = None
        self.test_name = None

        self.createMessages()
开发者ID:curzona,项目名称:teamcity-python,代码行数:10,代码来源:unittestpy.py

示例5: __init__

# 需要导入模块: from unittest import TestResult [as 别名]
# 或者: from unittest.TestResult import __init__ [as 别名]
 def __init__(self, parent):
     """
     Constructor
     
     @param parent The parent widget.
     """
     TestResult.__init__(self)
     self.parent = parent
开发者ID:testmana2,项目名称:test,代码行数:10,代码来源:DCTestResult.py

示例6: __init__

# 需要导入模块: from unittest import TestResult [as 别名]
# 或者: from unittest.TestResult import __init__ [as 别名]
 def __init__(self, stream, descriptions, verbosity):
     TestResult.__init__(self)
     self.stream = _WritelnDecorator(stream)
     self.showAll = verbosity > 1
     self.descriptions = descriptions
     self._lastWas = 'success'
     self._errorsAndFailures = ""
     self._startTime = 0.0
     self.params=""
开发者ID:ask,项目名称:django-test-extensions,代码行数:11,代码来源:xmloutput.py

示例7: __init__

# 需要导入模块: from unittest import TestResult [as 别名]
# 或者: from unittest.TestResult import __init__ [as 别名]
 def __init__(self, xml, descriptions, verbosity):
     TestResult.__init__(self)
     self.xml = xml
     self.showAll = verbosity > 1
     self.dots = verbosity == 1
     self.descriptions = descriptions
     self._testsuites = {}
     self._testsuite_xml = None
     self._testcase_xml = None
开发者ID:christianurich,项目名称:VIBe2UrbanSim,代码行数:11,代码来源:opus_test_runner.py

示例8: __init__

# 需要导入模块: from unittest import TestResult [as 别名]
# 或者: from unittest.TestResult import __init__ [as 别名]
 def __init__(self):
     buildstep.LogLineObserver.__init__(self)
     TestResult.__init__(self)
     try:
         from subunit import TestProtocolServer
     except ImportError:
         raise ImportError("subunit is not importable, but is required for "
             "SubunitLogObserver support.")
     self.protocol = TestProtocolServer(self, DiscardStream())
开发者ID:Almad,项目名称:buildbot,代码行数:11,代码来源:subunitlogobserver.py

示例9: __init__

# 需要导入模块: from unittest import TestResult [as 别名]
# 或者: from unittest.TestResult import __init__ [as 别名]
    def __init__(self, result):
        """Constructor.

        @param result: TestResult The wrapped object
        """
        assert isinstance(result, TestResult);

        TestResult.__init__(self);

        self._result = result;
开发者ID:alquerci,项目名称:cyg-apt,代码行数:12,代码来源:__init__.py

示例10: __init__

# 需要导入模块: from unittest import TestResult [as 别名]
# 或者: from unittest.TestResult import __init__ [as 别名]
 def __init__(self):
     buildstep.LogLineObserver.__init__(self)
     TestResult.__init__(self)
     try:
         from subunit import TestProtocolServer
     except ImportError:
         raise ImportError("subunit is not importable, but is required for " "SubunitLogObserver support.")
     self.warningio = StringIO()
     self.protocol = TestProtocolServer(self, self.warningio)
     self.skips = []
     self.seen_tags = set()  # don't yet know what tags does in subunit
开发者ID:paperclip,项目名称:buildbot,代码行数:13,代码来源:subunitlogobserver.py

示例11: __init__

# 需要导入模块: from unittest import TestResult [as 别名]
# 或者: from unittest.TestResult import __init__ [as 别名]
 def __init__(self, stream=sys.stdout, *args, **kwargs):
     TestResult.__init__(self)
     for arg, value in kwargs.items():
         setattr(self, arg, value)
     self.output = stream
     self.messages = TeamcityServiceMessages(self.output, prepend_linebreak=True)
     if not "_jb_do_not_call_enter_matrix" in os.environ:
         self.messages.testMatrixEntered()
     self.current_failed = False
     self.current_suite = None
     self.subtest_suite = None
开发者ID:ashanco,项目名称:intellij-community,代码行数:13,代码来源:tcunittest.py

示例12: __init__

# 需要导入模块: from unittest import TestResult [as 别名]
# 或者: from unittest.TestResult import __init__ [as 别名]
 def __init__(self):
     logobserver.LogLineObserver.__init__(self)
     TestResult.__init__(self)
     try:
         from subunit import TestProtocolServer, PROGRESS_CUR, PROGRESS_SET
         from subunit import PROGRESS_PUSH, PROGRESS_POP
     except ImportError:
         raise ImportError("subunit is not importable, but is required for "
                           "SubunitLogObserver support.")
     self.PROGRESS_CUR = PROGRESS_CUR
     self.PROGRESS_SET = PROGRESS_SET
     self.PROGRESS_PUSH = PROGRESS_PUSH
     self.PROGRESS_POP = PROGRESS_POP
     self.warningio = StringIO()
     self.protocol = TestProtocolServer(self, self.warningio)
     self.skips = []
     self.seen_tags = set()  # don't yet know what tags does in subunit
开发者ID:fcofdez,项目名称:buildbot,代码行数:19,代码来源:subunit.py

示例13: __init__

# 需要导入模块: from unittest import TestResult [as 别名]
# 或者: from unittest.TestResult import __init__ [as 别名]
    def __init__(self, verbosity=1):
        TestResult.__init__(self)
        self.outputBuffer = StringIO()
        self.stdout0 = None
        self.stderr0 = None
        self.success_count = 0
        self.skip_count = 0
        self.failure_count = 0
        self.error_count = 0
        self.verbosity = verbosity

        # result is a list of result in 4 tuple
        # (
        #   result code (0: success; 1: fail; 2: error),
        #   TestCase object,
        #   Test output (byte string),
        #   stack trace,
        # )
        self.result = []
开发者ID:dash0002,项目名称:HTMLTestRunner,代码行数:21,代码来源:HTMLTestRunner.py

示例14: __init__

# 需要导入模块: from unittest import TestResult [as 别名]
# 或者: from unittest.TestResult import __init__ [as 别名]
 def __init__(self, status=None, on_success=None, on_failure=None,
              reset=None):
     TestResult.__init__(self)
     QtGui.QWidget.__init__(self)
     
     self.status = status
     self.on_success = on_success
     self.on_failure = on_failure
     self.reset = reset
     
     self.progress = QtGui.QProgressBar(self)
     if COLORED_PROGRESS:
         self.setProgressColor(BLUE_COLOR)
     
     self.success = QtGui.QListWidget(self)
     self.fail = QtGui.QListWidget(self)
     self.error = QtGui.QListWidget(self)
     
     self.success_data = []
     self.fail_data = []
     self.error_data = []
     
     self.views = []
     
     self.n_success = 0
     self.n_fail = 0
     self.n_error = 0
     
     left = QtGui.QVBoxLayout()
     left.addWidget(QtGui.QLabel('Passed Tests:'))
     left.addWidget(self.success)
     left.addWidget(self.progress)
     
     right = QtGui.QVBoxLayout()
     right.addWidget(QtGui.QLabel('Tests with Errors:'))
     right.addWidget(self.error)
     right.addWidget(QtGui.QLabel('Failed Tests:'))
     right.addWidget(self.fail)
     
     main = QtGui.QHBoxLayout()
     main.addLayout(left)
     main.addLayout(right)
     
     self.setLayout(main)
     
     self.connect(
         self.success,
         QtCore.SIGNAL("itemDoubleClicked ( QListWidgetItem * )"),
         self.successItemDoubleClicked
     )
     self.connect(
         self.fail,
         QtCore.SIGNAL("itemDoubleClicked ( QListWidgetItem * )"),
         self.failureItemDoubleClicked
     )
     self.connect(
         self.error,
         QtCore.SIGNAL("itemDoubleClicked ( QListWidgetItem * )"),
         self.errorItemDoubleClicked
     )
     
     self.translate = {
         'success': self.addSuccess,'failure': self.addFailure,
         'error': self.addError, 'start': self.startTest,
         'done': self.done
     }
开发者ID:derdon,项目名称:qtestudo,代码行数:68,代码来源:qtestudo.py

示例15: __init__

# 需要导入模块: from unittest import TestResult [as 别名]
# 或者: from unittest.TestResult import __init__ [as 别名]
 def __init__(self, stream=stdout, errStream=stderr, verbosity=1):
     UnitTestResult.__init__(self)
     self.showAll = verbosity > 1
     self.dots = verbosity == 1
     self._errStream = errStream
     self._stream = stream
开发者ID:seecr,项目名称:meresco-triplestore,代码行数:8,代码来源:testrunner.py


注:本文中的unittest.TestResult.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。