zoukankan      html  css  js  c++  java
  • unittest -官网文档学习笔记-Grouping tests

    class unittest.TestSuite(tests=())

      This class represents an aggregation of individul tests cases and test suites. The class presents the interface needed by the test runner to allow it to be run as any other test case. Running a TestSuite instance is the same as iterating over the suite, running each test individually.

      if tests is given, it must be an iterable of individual test cases or other test suites that will be used to build the suite initially. Additional methods are provided to add test cases and suites to the collection later on.

    addTest(test)
      Add a TestCase or TestSuite to the suiet.

    addTests(tests)
      Add all the tests from an iterable of TestCase and TestSuite instances to this test suite.
      This is equivalet to iterating over tests, calling addTest() for each element.

    TestSuite shares the following methods with TestCase:

    run(result)

    debug()

    countTestCases()

    __iter__()

    In the typical usage of a TestSuite object, the run() method is invoked by a TestRunner rather than by the end-user test harness.

  • 相关阅读:
    zabbix笔记之计算型监控项详解
    zabbix笔记之磁盘IO介绍
    zabbix笔记之Graphtree配置
    zabbix笔记之告警时远程执行命令
    zabbix笔记之异常优化
    zabbix笔记之IPMI配置
    基本的sql 语句
    socket 套接字
    调用父类的三种方法
    实例属性和类属性
  • 原文地址:https://www.cnblogs.com/isister/p/4639140.html
Copyright © 2011-2022 走看看