本文整理汇总了Python中_pytest.terminal.TerminalReporter.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python TerminalReporter.__init__方法的具体用法?Python TerminalReporter.__init__怎么用?Python TerminalReporter.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类_pytest.terminal.TerminalReporter
的用法示例。
在下文中一共展示了TerminalReporter.__init__方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from _pytest.terminal import TerminalReporter [as 别名]
# 或者: from _pytest.terminal.TerminalReporter import __init__ [as 别名]
def __init__(self, reporter):
TerminalReporter.__init__(self, reporter.config)
self.writer = self._tw
self.tests_count = 0
self.reports = []
self.skipped = []
self.failed = []
self.result = StreamResultToBytes(self.writer._file)
示例2: __init__
# 需要导入模块: from _pytest.terminal import TerminalReporter [as 别名]
# 或者: from _pytest.terminal.TerminalReporter import __init__ [as 别名]
def __init__(self, reporter):
TerminalReporter.__init__(self, reporter.config)
self.writer = self._tw
self.paths_left = []
self.tests_count = 0
self.tests_taken = 0
self.reports = []
self.unreported_errors = []
self.progress_blocks = []
self.reset_tracked_lines()
示例3: __init__
# 需要导入模块: from _pytest.terminal import TerminalReporter [as 别名]
# 或者: from _pytest.terminal.TerminalReporter import __init__ [as 别名]
def __init__(self, reporter):
TerminalReporter.__init__(self, reporter.config)
self.writer = self._tw
self.paths_left = []
self.tests_count = 0
self.tests_taken = 0
self.current_line = ''
self.currentfspath2 = ''
self.time_taken = {}
self.reports = []
self.unreported_errors = []
示例4: __init__
# 需要导入模块: from _pytest.terminal import TerminalReporter [as 别名]
# 或者: from _pytest.terminal.TerminalReporter import __init__ [as 别名]
def __init__(self, reporter):
#pytest_collectreport = self.pytest_collectreport
TerminalReporter.__init__(self, reporter.config)
self.writer = self._tw
self.eta_logger = EtaLogger()
self.paths_left = []
self.tests_count = 0
self.tests_taken = 0
self.current_line = u''
self.currentfspath2 = ''
self.time_taken = {}
self.reports = []
self.unreported_errors = []
示例5: __init__
# 需要导入模块: from _pytest.terminal import TerminalReporter [as 别名]
# 或者: from _pytest.terminal.TerminalReporter import __init__ [as 别名]
def __init__(self, config=None, file=None):
if config:
# If we have a config, nothing more needs to be done
return TerminalReporter.__init__(self, config, file)
# Without a config, pretend to be a TerminalReporter
# hook-related functions (logreport, collection, etc) will be outrigt broken,
# but the line writers should still be usable
if file is None:
file = sys.stdout
self._tw = self.writer = TerminalWriter(file)
self.hasmarkup = self._tw.hasmarkup
self.reportchars = ''
self.currentfspath = None
示例6: __init__
# 需要导入模块: from _pytest.terminal import TerminalReporter [as 别名]
# 或者: from _pytest.terminal.TerminalReporter import __init__ [as 别名]
def __init__(self, config, file=None):
TerminalReporter.__init__(self, config, file)
示例7: __init__
# 需要导入模块: from _pytest.terminal import TerminalReporter [as 别名]
# 或者: from _pytest.terminal.TerminalReporter import __init__ [as 别名]
def __init__(self, reporter):
TerminalReporter.__init__(self, reporter.config)
self.config = reporter.config
self.outdent = DEFAULT_OUTDENT
self.stdout = os.fdopen(os.dup(sys.stdout.fileno()), 'w')
self.tw = py._io.terminalwriter.TerminalWriter(self.stdout)
示例8: __init__
# 需要导入模块: from _pytest.terminal import TerminalReporter [as 别名]
# 或者: from _pytest.terminal.TerminalReporter import __init__ [as 别名]
def __init__(self, config):
TerminalReporter.__init__(self, config)
示例9: __init__
# 需要导入模块: from _pytest.terminal import TerminalReporter [as 别名]
# 或者: from _pytest.terminal.TerminalReporter import __init__ [as 别名]
def __init__(self, reporter):
"""Initialize TerminalReporter without features we don't need.
:type reporter: :py:class:`_pytest.terminal.TerminalReporter`
"""
TerminalReporter.__init__(self, reporter.config)