diff options
Diffstat (limited to 'tests/test_comments.py')
-rw-r--r-- | tests/test_comments.py | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/test_comments.py b/tests/test_comments.py new file mode 100644 index 0000000..73fd623 --- /dev/null +++ b/tests/test_comments.py @@ -0,0 +1,33 @@ +from qface.generator import FileSystem +from qface.helper import doc +import logging +import logging.config +from path import Path +import re + + +# logging.config.fileConfig('logging.ini') +logging.basicConfig() + +log = logging.getLogger(__name__) + +inputPath = Path('tests/in') + + +def loadEcho(): + path = inputPath / 'org.example.echo.qface' + return FileSystem.parse_document(path) + + +def test_comment(): + system = loadEcho() + module = system.lookup('org.example.echo') + assert module.comment == '/** module */' + assert module + interface = system.lookup('org.example.echo.Echo') + assert interface + o = doc.parse_doc(interface.comment) + assert o.brief == 'the brief' + assert o.description == 'the description\ncontinued' + assert o.deprecated is None + |