timApp.tests.unit package
Contents
timApp.tests.unit package#
Submodules#
timApp.tests.unit.test_attributeparser module#
timApp.tests.unit.test_correct_yaml module#
timApp.tests.unit.test_dataclass_deserialization module#
timApp.tests.unit.test_datefilters module#
- class timApp.tests.unit.test_datefilters.TestFormatDate(methodName='runTest')[source]#
Bases:
unittest.case.TestCase
- class timApp.tests.unit.test_datefilters.TestInc(methodName='runTest')[source]#
Bases:
unittest.case.TestCase
- class timApp.tests.unit.test_datefilters.TestMonthToWeek(methodName='runTest')[source]#
Bases:
unittest.case.TestCase
- class timApp.tests.unit.test_datefilters.TestWeekToDate(methodName='runTest')[source]#
Bases:
unittest.case.TestCase
timApp.tests.unit.test_dateparsing module#
timApp.tests.unit.test_documentparser module#
timApp.tests.unit.test_find_inline_plugins module#
timApp.tests.unit.test_genfields module#
timApp.tests.unit.test_import_data module#
timApp.tests.unit.test_mailbody_convert module#
timApp.tests.unit.test_question_normalize module#
timApp.tests.unit.test_srange module#
timApp.tests.unit.test_title_to_id module#
timApp.tests.unit.test_translator_generic module#
Contains prototypal testing for a generic model of translating from language to another.
- class timApp.tests.unit.test_translator_generic.TestGenericTranslator(methodName='runTest')[source]#
Bases:
timApp.tests.server.test_translation.TimTranslationTest
,timApp.tests.unit.test_translator_parser.TimTranslationParserTest
timApp.tests.unit.test_translator_parser module#
Contains tests for the parsing that is performed on TIM’s Markdown before machine translation. Most tests check that correct parts are being marked as Translate or NoTranslate and that the Markdown is constructed with good enough accuracy to original.
- class timApp.tests.unit.test_translator_parser.TestParser(methodName='runTest')[source]#
Bases:
unittest.case.TestCase
,timApp.tests.unit.test_translator_parser.TimTranslationParserTest
- test_bulletlist2()[source]#
Testing bulletlist with different indentation and with a code block in between the list.
- test_notranslate_style2()[source]#
Testing notranslate style with brackets and parenthesis inside. Will fail if it contains unclosed [ or ]
- test_ordered_list1()[source]#
Testing orderedlist with all the different ways they can be formatted.
- test_ordered_list2()[source]#
Testing orderedlist with all the different ways they can be formatted and with indentation.
- test_ordered_list3()[source]#
Testing orderedlist with all the different ways they can be formatted with indentation and different number-digits.
- test_tex_collect_math_function2()[source]#
Testing a math function mathrm inside latex using double dollar signs
- class timApp.tests.unit.test_translator_parser.TimTranslationParserTest[source]#
Bases:
object
A Base class to run translation tests needing a parser instance.
- parser: timApp.document.translation.translationparser.TranslationParser = TranslationParser(quote='"')#
timApp.tests.unit.test_unique_code module#
timApp.tests.unit.test_valid_email module#
timApp.tests.unit.test_widen_fields module#
timApp.tests.unit.test_yamlblock module#
- class timApp.tests.unit.test_yamlblock.YamlBlockTest(methodName='runTest')[source]#
Bases:
unittest.case.TestCase
- combined_append = '\nmacros:\n first: a\n second: c\n third: d\ncss: |!! a\n.red {\n color: red;\n}\n.blue {\n color: blue;\n}\n!!\n '#
- combined_replace = '\nmacros:\n first: a\n second: c\n third: d\ncss: |!!\n.blue {\n color: blue;\n}\n!!\n '#
- md1 = '\nmacros:\n first: a\n second: b\ncss: |!!\n.red {\n color: red;\n}\n!!\n '#
- md2 = '\nmacros:\n second: c\n third: d\ncss: |!!\n.blue {\n color: blue;\n}\n!!\n '#
- multiple_multiline = '\na: |!!\ntest1\n!!\nb: |??\ntest2\n??\n '#