Mercurial > hg > orthanc-stone
comparison Resources/CodeGeneration/stonegentool_test.py @ 515:1dbf2d9ed1e4 bgo-commands-codegen
Added .j2 extension to the Jinja2 template files to allow for a better syntax highlighting experience (a.o. in vscode)
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Mon, 11 Mar 2019 14:39:31 +0100 |
parents | fc17251477d6 |
children | b7fd0471281c |
comparison
equal
deleted
inserted
replaced
514:381144d2434f | 515:1dbf2d9ed1e4 |
---|---|
377 def test_generateWholeTsFile(self): | 377 def test_generateWholeTsFile(self): |
378 schemaFile = \ | 378 schemaFile = \ |
379 os.path.join(os.path.dirname(__file__), 'test_data', 'test1.yaml') | 379 os.path.join(os.path.dirname(__file__), 'test_data', 'test1.yaml') |
380 tdico = GetTemplatingDictFromSchemaFilename(schemaFile) | 380 tdico = GetTemplatingDictFromSchemaFilename(schemaFile) |
381 tsTemplateFile = \ | 381 tsTemplateFile = \ |
382 os.path.join(os.path.dirname(__file__), 'template.in.ts') | 382 os.path.join(os.path.dirname(__file__), 'template.in.ts.j2') |
383 template = MakeTemplateFromFile(tsTemplateFile) | 383 template = MakeTemplateFromFile(tsTemplateFile) |
384 renderedCode = template.render(**tdico) | 384 renderedCode = template.render(**tdico) |
385 print(renderedCode) | 385 print(renderedCode) |
386 | 386 |
387 def test_GenerateTypeScriptHandlerInterface(self): | 387 def test_GenerateTypeScriptHandlerInterface(self): |