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


Python OWReport.get_instance方法代码示例

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


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

示例1: test_report_widgets_visualize

# 需要导入模块: from Orange.canvas.report.owreport import OWReport [as 别名]
# 或者: from Orange.canvas.report.owreport.OWReport import get_instance [as 别名]
 def test_report_widgets_visualize(self):
     app = QApplication(sys.argv)
     rep = OWReport.get_instance()
     data = Table("zoo")
     widgets = self.visu_widgets
     self.assertEqual(len(widgets), 10)
     self._create_report(widgets, rep, data, app)
开发者ID:Coding4Sec,项目名称:orange3,代码行数:9,代码来源:test_report.py

示例2: test_report_widgets_all

# 需要导入模块: from Orange.canvas.report.owreport import OWReport [as 别名]
# 或者: from Orange.canvas.report.owreport.OWReport import get_instance [as 别名]
 def test_report_widgets_all(self):
     rep = OWReport.get_instance()
     widgets = self.clas_widgets + self.data_widgets + self.eval_widgets + \
               self.regr_widgets + self.unsu_widgets + self.dist_widgets + \
               self.visu_widgets + self.spec_widgets
     self.assertEqual(len(widgets), 52)
     self._create_report(widgets, rep, None)
开发者ID:JackWangCUMT,项目名称:orange3,代码行数:9,代码来源:test_report.py

示例3: test_report_widgets_all

# 需要导入模块: from Orange.canvas.report.owreport import OWReport [as 别名]
# 或者: from Orange.canvas.report.owreport.OWReport import get_instance [as 别名]
 def test_report_widgets_all(self):
     app = QApplication(sys.argv)
     rep = OWReport.get_instance()
     widgets = self.clas_widgets + self.data_widgets + self.eval_widgets + \
               self.regr_widgets + self.unsu_widgets + self.dist_widgets + \
               self.visu_widgets + self.spec_widgets
     self.assertEqual(len(widgets), 51)
     self._create_report(widgets, rep, None, app)
开发者ID:pombredanne,项目名称:orange3,代码行数:10,代码来源:test_report.py

示例4: test_report

# 需要导入模块: from Orange.canvas.report.owreport import OWReport [as 别名]
# 或者: from Orange.canvas.report.owreport.OWReport import get_instance [as 别名]
 def test_report(self):
     count = 5
     app = QApplication(sys.argv)
     for i in range(count):
         rep = OWReport.get_instance()
         file = OWFile()
         file.create_report_html()
         rep.make_report(file)
     self.assertEqual(rep.table_model.rowCount(), count)
开发者ID:Coding4Sec,项目名称:orange3,代码行数:11,代码来源:test_report.py

示例5: show_report

# 需要导入模块: from Orange.canvas.report.owreport import OWReport [as 别名]
# 或者: from Orange.canvas.report.owreport.OWReport import get_instance [as 别名]
    def show_report(self):
        """
        Raise the report window.
        """
        from Orange.canvas.report.owreport import OWReport

        report = OWReport.get_instance()
        self.create_report_html()
        report.make_report(self)
        report.show()
        report.raise_()
开发者ID:astaric,项目名称:orange3,代码行数:13,代码来源:report.py

示例6: test_save_report_permission

# 需要导入模块: from Orange.canvas.report.owreport import OWReport [as 别名]
# 或者: from Orange.canvas.report.owreport.OWReport import get_instance [as 别名]
 def test_save_report_permission(self):
     """
     Permission Error may occur when trying to save report.
     GH-2147
     """
     rep = OWReport.get_instance()
     patch_target_1 = "Orange.canvas.report.owreport.open"
     patch_target_2 = "AnyQt.QtWidgets.QFileDialog.getSaveFileName"
     patch_target_3 = "AnyQt.QtWidgets.QMessageBox.exec_"
     filenames = ["f.report", "f.html"]
     for filename in filenames:
         with unittest.mock.patch(patch_target_1, create=True, side_effect=PermissionError),\
                 unittest.mock.patch(patch_target_2, return_value=(filename, 0)),\
                 unittest.mock.patch(patch_target_3, return_value=True):
             rep.save_report()
开发者ID:astaric,项目名称:orange3,代码行数:17,代码来源:test_report.py

示例7: test_save_report

# 需要导入模块: from Orange.canvas.report.owreport import OWReport [as 别名]
# 或者: from Orange.canvas.report.owreport.OWReport import get_instance [as 别名]
 def test_save_report(self):
     rep = OWReport.get_instance()
     file = self.create_widget(OWFile)
     file.create_report_html()
     rep.make_report(file)
     temp_dir = tempfile.mkdtemp()
     temp_name = os.path.join(temp_dir, "f.report")
     try:
         with mock.patch("AnyQt.QtWidgets.QFileDialog.getSaveFileName",
                         return_value=(temp_name, 0)), \
                 mock.patch("AnyQt.QtWidgets.QMessageBox.exec_",
                            return_value=True):
             rep.save_report()
     finally:
         os.remove(temp_name)
         os.rmdir(temp_dir)
开发者ID:astaric,项目名称:orange3,代码行数:18,代码来源:test_report.py

示例8: show_report_view

# 需要导入模块: from Orange.canvas.report.owreport import OWReport [as 别名]
# 或者: from Orange.canvas.report.owreport.OWReport import get_instance [as 别名]
 def show_report_view(self):
     from Orange.canvas.report.owreport import OWReport
     inst = OWReport.get_instance()
     inst.show()
     inst.raise_()
开发者ID:JingqinGao,项目名称:orange3,代码行数:7,代码来源:widgetsscheme.py

示例9: test_report_widgets_all

# 需要导入模块: from Orange.canvas.report.owreport import OWReport [as 别名]
# 或者: from Orange.canvas.report.owreport.OWReport import get_instance [as 别名]
 def test_report_widgets_all(self):
     rep = OWReport.get_instance()
     widgets = self.model_widgets + self.data_widgets + self.eval_widgets + \
               self.unsu_widgets + self.dist_widgets + self.visu_widgets + \
               self.spec_widgets
     self._create_report(widgets, rep, None)
开发者ID:astaric,项目名称:orange3,代码行数:8,代码来源:test_report.py


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