Example #1
0
 def test_report(self):
     count = 5
     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)
                return widget


if __name__ == "__main__":
    import sys
    from Orange.data import Table
    from Orange.widgets.data.owfile import OWFile
    from Orange.widgets.data.owtable import OWDataTable
    from Orange.widgets.data.owdiscretize import OWDiscretize
    from Orange.widgets.model.owrandomforest import OWRandomForest

    iris = Table("iris")
    app = QApplication(sys.argv)

    main = OWReport.get_instance()
    file = OWFile()
    file.create_report_html()
    main.make_report(file)

    table = OWDataTable()
    table.set_dataset(iris)
    table.create_report_html()
    main.make_report(table)

    main = OWReport.get_instance()
    disc = OWDiscretize()
    disc.create_report_html()
    main.make_report(disc)

    learner = OWRandomForest()
    learner.create_report_html()
Example #3
0
 def setUp(self):
     self.widget = OWFile()
     self.event_data = None