Overview
Comment: | [core] tests: show numbers about suggestions testing |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk | core |
Files: | files | file ages | folders |
SHA3-256: |
6d08386c170958ca1ff4486e37153fc8 |
User & Date: | olr on 2020-12-29 11:35:37 |
Original Comment: | [fr] ajustements (tests) |
Other Links: | manifest | tags |
Context
2020-12-29
| ||
11:48 | [core] tests: better percentage display check-in: deb80079a2 user: olr tags: trunk, core | |
11:35 | [core] tests: show numbers about suggestions testing check-in: 6d08386c17 user: olr tags: trunk, core | |
11:10 | [fr] ajustements (tests) check-in: 2e204c1ffd user: olr tags: trunk, fr | |
Changes
Modified gc_core/py/lang_core/tests_core.py from [a6e208a4a9] to [fa9416c2a2].
︙ | |||
70 71 72 73 74 75 76 | 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | + - - + + + + + + - + - - - + + + + | 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): print(f"No file <gc_test.txt> in <{spHere}>") return with open(spfParsingTest, "r", encoding="utf-8") as hSrc: nUnexpectedErrors = 0 |
︙ | |||
148 149 150 151 152 153 154 | 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 | - + | aGramErrs = [ dMsgErr for dMsgErr in sorted(aGramErrs, key=lambda d: d["nStart"]) if self._zRuleEnd.sub("", dMsgErr["sRuleId"]) != self._zRuleEnd.sub("", dErr["sRuleId"]) ] aSpellErrs = self._oSpellChecker.parseParagraph(re.sub("‹[^›]+›", lambda m: " " * len(m.group(0)), dErr["sMessage"])) if aGramErrs or aSpellErrs or "<start>" in dErr["sMessage"] or "<end>" in dErr["sMessage"]: print("\n# Error in: <" + dErr["sMessage"] + ">\n " + dErr["sLineId"] + " / " + dErr["sRuleId"]) for dMsgErr in aGramErrs: print(" error: {sLineId} / {sRuleId} at {nStart}:{nEnd}".format(**dMsgErr)) for dMsgErr in aSpellErrs: |
︙ |