source: orange/Orange/testing/unit/tests/test_io.py @ 9679:3879dea56188

Revision 9679:3879dea56188, 763 bytes checked in by Miha Stajdohar <miha.stajdohar@…>, 2 years ago (diff)

Moved and renamed testing.

Line 
1import unittest
2import Orange
3from Orange.misc import testing
4import os, sys
5
6datasets = ["iris", "housing", ]
7
8def names_iter():
9    for n in datasets:
10        yield n, (n,)
11       
12@testing.data_driven(data_iter=names_iter())
13class TestIO(unittest.TestCase):
14#    def setUp(self):
15#        Orange.data.io.set_search_paths()
16    @testing.test_on_data
17    def test_io_on(self, name):
18        table = Orange.data.Table(name)
19        for ext in ["tab", "svm", "arff"]: # TODO: add R, and C50
20            filename = name + "." + ext
21            try:
22                table.save(filename)
23                table_clone = Orange.data.Table(filename)
24            finally:
25                os.remove(filename)
26               
27if __name__ == "__main__":
28    unittest.main()
Note: See TracBrowser for help on using the repository browser.