本文整理匯總了Python中kitty.data.report.Report.clear方法的典型用法代碼示例。如果您正苦於以下問題:Python Report.clear方法的具體用法?Python Report.clear怎麽用?Python Report.clear使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類kitty.data.report.Report
的用法示例。
在下文中一共展示了Report.clear方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: testClearDataEntry
# 需要導入模塊: from kitty.data.report import Report [as 別名]
# 或者: from kitty.data.report.Report import clear [as 別名]
def testClearDataEntry(self):
report = Report(self.report_name)
entry_name = 'my entry'
entry_data = 'some data'
report.add(entry_name, entry_data)
self.assertEqual(report.get(entry_name), entry_data)
report.clear()
self.assertEqual(report.get(entry_name), None)
示例2: testClearSubReportEntry
# 需要導入模塊: from kitty.data.report import Report [as 別名]
# 或者: from kitty.data.report.Report import clear [as 別名]
def testClearSubReportEntry(self):
entry_name = 'sub report'
report = Report(self.report_name)
subreport = Report(entry_name)
report.add(entry_name, subreport)
self.assertEqual(report.get(entry_name), subreport)
report.clear()
self.assertEqual(report.get(entry_name), None)
示例3: testClearRestoresStatusToDefaultPassed
# 需要導入模塊: from kitty.data.report import Report [as 別名]
# 或者: from kitty.data.report.Report import clear [as 別名]
def testClearRestoresStatusToDefaultPassed(self):
report = Report(self.report_name)
self.assertEqual(report.get_status(), Report.PASSED)
report.failed('mock failure')
report.clear()
self.assertEqual(report.get_status(), Report.PASSED)
示例4: testClearKeepsName
# 需要導入模塊: from kitty.data.report import Report [as 別名]
# 或者: from kitty.data.report.Report import clear [as 別名]
def testClearKeepsName(self):
report = Report(self.report_name)
self.assertEqual(report.get_name(), self.report_name)
report.clear()
self.assertEqual(report.get_name(), self.report_name)
示例5: testClearRestoresStatusToDefaultFailed
# 需要導入模塊: from kitty.data.report import Report [as 別名]
# 或者: from kitty.data.report.Report import clear [as 別名]
def testClearRestoresStatusToDefaultFailed(self):
report = Report(self.report_name, default_failed=True)
self.assertEqual(report.get_status(), Report.FAILED)
report.passed()
report.clear()
self.assertEqual(report.get_status(), Report.FAILED)