summaryrefslogtreecommitdiff
path: root/tests/test_parser.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_parser.py')
-rw-r--r--tests/test_parser.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/test_parser.py b/tests/test_parser.py
index b2844fc..6adfe04 100644
--- a/tests/test_parser.py
+++ b/tests/test_parser.py
@@ -1,5 +1,6 @@
import logging
import logging.config
+import pytest
from path import Path
from qface.generator import FileSystem
@@ -190,3 +191,24 @@ def test_interface_property():
assert prop.type.is_interface
assert prop.type.reference is extension
+
+def test_symbol_kind():
+ system = load_tuner()
+ tuner = system.lookup('com.pelagicore.ivi.tuner.Tuner')
+ assert tuner.kind == 'interface'
+ property = system.lookup('com.pelagicore.ivi.tuner.Tuner#primitiveModel')
+ assert property.kind == 'property'
+
+
+def test_parser_exceptions():
+ path = inputPath / 'org.example.failing.qface'
+ system = FileSystem.parse_document(path)
+
+ try:
+ system = FileSystem.parse_document('not-exists')
+ except SystemExit as e:
+ pass
+ else:
+ pytest.fail('should not ome here')
+
+