Overview
| Comment: | [core] tests: also test messages |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk | core |
| Files: | files | file ages | folders |
| SHA3-256: |
a56f68f7ac774e16ff7db1e244dadffe |
| User & Date: | olr on 2018-11-26 08:41:08 |
| Other Links: | manifest | tags |
Context
|
2018-11-26
| ||
| 08:49 | [fr] correction de messages check-in: 8cc4efc761 user: olr tags: trunk, fr | |
| 08:41 | [core] tests: also test messages check-in: a56f68f7ac user: olr tags: trunk, core | |
| 08:15 | [fr] faux positifs check-in: f9a95f5a55 user: olr tags: trunk, fr | |
Changes
Modified gc_lang/fr/modules/tests.py from [7a6a733de8] to [582cec6490].
| ︙ | |||
122 123 124 125 126 127 128 | 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 | - + |
class TestGrammarChecking (unittest.TestCase):
@classmethod
def setUpClass (cls):
gce.load()
cls._zError = re.compile(r"\{\{.*?\}\}")
|
| ︙ | |||
168 169 170 171 172 173 174 | 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 | - + |
"\n errors: \n" + sListErr)
nError += 1
if nError:
print("Unexpected errors:", nError)
# untested rules
i = 0
for sOpt, sLineId, sRuleId in gce.listRules():
|
| ︙ | |||
192 193 194 195 196 197 198 | 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 | - + + + + + + |
sRes = " " * len(sLine)
sListErr = ""
lAllSugg = []
for dErr in aErrs:
sRes = sRes[:dErr["nStart"]] + "~" * (dErr["nEnd"] - dErr["nStart"]) + sRes[dErr["nEnd"]:]
sListErr += " * {sLineId} / {sRuleId} at {nStart}:{nEnd}\n".format(**dErr)
lAllSugg.append("|".join(dErr["aSuggestions"]))
|
| ︙ |