summaryrefslogtreecommitdiff
path: root/src/scripts/pyolian/test_eolian.py
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2018-11-28 20:16:19 +0100
committerDave Andreoli <dave@gurumeditation.it>2018-11-28 20:16:19 +0100
commit433b561e276b8965dcc109773e6a3bc05897c322 (patch)
tree59388904c624488fc2345beba6a0a7c4cad07eb5 /src/scripts/pyolian/test_eolian.py
parenta10eda5137aeaf7fd91c11f353c9be9fc6cdbcb8 (diff)
Pyolian tests: 2 small improvements
1. properly use unittest infra to skip tests, otherwise we will forgot the commented tests 2. split the new name collision test (failing, but really cool) so it have a proper name and the results are more readable
Diffstat (limited to '')
-rwxr-xr-xsrc/scripts/pyolian/test_eolian.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/scripts/pyolian/test_eolian.py b/src/scripts/pyolian/test_eolian.py
index 0ed27c2180..a1ab85b2e3 100755
--- a/src/scripts/pyolian/test_eolian.py
+++ b/src/scripts/pyolian/test_eolian.py
@@ -97,11 +97,11 @@ class TestEolianUnit(unittest.TestCase):
97 self.assertIsInstance(unit, eolian.Eolian_Unit) 97 self.assertIsInstance(unit, eolian.Eolian_Unit)
98 self.assertEqual(unit.file, 'efl_ui_win.eo') 98 self.assertEqual(unit.file, 'efl_ui_win.eo')
99 99
100 # Commented out until unit/state support is fixed 100 @unittest.skip('Skipped until unit/state support is fixed')
101 # def test_children_listing(self): 101 def test_children_listing(self):
102 # l = list(eolian_db.children) 102 l = list(eolian_db.children)
103 # self.assertGreater(len(l), 500) 103 self.assertGreater(len(l), 500)
104 # self.assertIsInstance(l[0], eolian.Eolian_Unit) 104 self.assertIsInstance(l[0], eolian.Eolian_Unit)
105 105
106 def test_file_listing(self): 106 def test_file_listing(self):
107 l = list(eolian_db.eo_file_paths) 107 l = list(eolian_db.eo_file_paths)
@@ -210,11 +210,14 @@ class TestEolianNamespace(unittest.TestCase):
210 count = 0 210 count = 0
211 for ns in eolian_db.all_namespaces: 211 for ns in eolian_db.all_namespaces:
212 self.assertIsInstance(ns, eolian.Namespace) 212 self.assertIsInstance(ns, eolian.Namespace)
213 cls = eolian_db.class_by_name_get(ns.name)
214 self.assertIsNone(cls)
215 count += 1 213 count += 1
216 self.assertGreater(count, 100) 214 self.assertGreater(count, 100)
217 215
216 def test_namespace_vs_class_collision(self):
217 for ns in eolian_db.all_namespaces:
218 cls = eolian_db.class_by_name_get(ns.name)
219 self.assertIsNone(cls)
220
218 def test_namespace_equality(self): 221 def test_namespace_equality(self):
219 ns1 = eolian.Namespace(eolian_db, 'Efl.Io') 222 ns1 = eolian.Namespace(eolian_db, 'Efl.Io')
220 ns2 = eolian.Namespace(eolian_db, 'Efl.Net') 223 ns2 = eolian.Namespace(eolian_db, 'Efl.Net')