Nir Soffer has posted comments on this change.
Change subject: tests: Introduce schema parsing tests ......................................................................
Patch Set 2: -Code-Review
(1 comment)
I don't have time to dive into the schema parser now.
https://gerrit.ovirt.org/#/c/45464/2/tests/schemaTests.py File tests/schemaTests.py:
Line 106: def load_api(self, data): Line 107: vdsmapi._api_info = None Line 108: data = textwrap.dedent(data) Line 109: with temporaryPath(data=data) as filename: Line 110: yield vdsmapi.get_api(filename)
Can we avoid creating a temporary file for each test?
After talking with Adam, we decided to improve this later. Line 111: Line 112: def assertTypeRelation(self, api, type_a, type_b): Line 113: self.assertIn(type_b, api['unions'][type_a]) Line 114: self.assertIn(type_a, api['unions'][type_b])