Overview
Comment: | [core][fr] tests update |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk | fr | core |
Files: | files | file ages | folders |
SHA3-256: |
6639af3543877a405e4af8823aa698db |
User & Date: | olr on 2020-11-21 21:42:51 |
Other Links: | manifest | tags |
Context
2020-11-23
| ||
10:32 | [build] check token validity check-in: b5ee5c589f user: olr tags: trunk, build | |
2020-11-21
| ||
21:42 | [core][fr] tests update check-in: 6639af3543 user: olr tags: trunk, fr, core | |
21:42 | [fr] corrections des messages d’erreur + ajustements check-in: 84539a25d6 user: olr tags: trunk, fr | |
Changes
Modified gc_core/py/lang_core/tests_core.py from [b3d6379019] to [9e599f13ec].
︙ | |||
58 59 60 61 62 63 64 65 66 67 68 69 70 71 | 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | + | class TestGrammarChecking (unittest.TestCase): "Tests du correcteur grammatical" @classmethod def setUpClass (cls): gc_engine.load() cls._zError = re.compile(r"\{\{.*?\}\}") cls._zRuleEnd = re.compile(r"_a\d+_\d+$") cls._aTestedRules = set() def test_parse (self): zOption = re.compile("^__([a-zA-Z0-9]+)__ ") spHere, _ = os.path.split(__file__) spfParsingTest = os.path.join(spHere, "gc_test.txt") if not os.path.exists(spfParsingTest): |
︙ | |||
141 142 143 144 145 146 147 | 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 | + + - + - - + | sListErr += " * {sLineId} / {sRuleId} at {nStart}:{nEnd}\n".format(**dErr) lAllSugg.append("|".join(dErr["aSuggestions"])) self._aTestedRules.add(dErr["sRuleId"].rstrip("0123456789")) # test messages if False: aMsgErrs = gc_engine.parse(purgeMessage(dErr["sMessage"])) if aMsgErrs or "<start>" in dErr["sMessage"] or "<end>" in dErr["sMessage"]: aSelectedErrs = [ dMsgErr for dMsgErr in sorted(aMsgErrs, key=lambda d: d["nStart"]) if self._zRuleEnd.sub("", dMsgErr["sRuleId"]) != self._zRuleEnd.sub("", dErr["sRuleId"]) ] if aSelectedErrs: |
︙ |
Modified gc_lang/fr/modules/tests_modules.py from [88e56a7f78] to [f7e92c1ab0].
1 2 3 4 5 6 7 8 9 10 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | - + | #! python3 """ Grammar checker tests for French language """ import unittest import time from contextlib import contextmanager |
︙ | |||
28 29 30 31 32 33 34 | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | - + - + - + - + - + - + - + - + + + + + + + + + + + + + | class TestDictionary (unittest.TestCase): "Test du correcteur orthographique" @classmethod def setUpClass (cls): |
︙ |