Grammalecte  Check-in [ac727cfd6b]

Overview
Comment:[fr] test: untested rules
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | fr
Files: files | file ages | folders
SHA3-256: ac727cfd6b27754bc8123a33f6af6158e8cca81f16c2e432f6fdd33b22d3b99a
User & Date: olr on 2020-03-21 10:16:44
Other Links: manifest | tags
Context
2020-03-21
14:35
[fr] tests supplémentaires check-in: 7f0b5b060e user: olr tags: trunk, fr
10:16
[fr] test: untested rules check-in: ac727cfd6b user: olr tags: trunk, fr
2020-03-20
16:30
[core] adjusst sentence detection check-in: f49fe68f6c user: olr tags: trunk, core
Changes

Modified gc_lang/fr/modules/tests.py from [3d6c560ee1] to [544edd53c7].

202
203
204
205
206
207
208

209
210
211
212
213
214
215
216
217
218
219
220
221
                              "\n  found:    " + sFoundSuggs + \
                              "\n  errors:   \n" + sListErr)
                        nError += 1
            if nError:
                print("Unexpected errors:", nError)
        # untested rules
        i = 0

        for _, sOpt, sLineId, sRuleId in gce.listRules():
            if sOpt != "@@@@" and sRuleId not in self._aTestedRules and not re.search("^[0-9]+[sp]$|^[pd]_", sRuleId):
                echo(sLineId + "/" + sRuleId, end= ", ")
                i += 1
        if i:
            echo("\n[{} untested rules]".format(i))

    def _splitTestLine (self, sLine):
        sText, sSugg = sLine.split("->>")
        return (sText.strip(), sSugg.strip())

    def _getFoundErrors (self, sLine, sOption):
        if sOption:







>


|

<
|







202
203
204
205
206
207
208
209
210
211
212
213

214
215
216
217
218
219
220
221
                              "\n  found:    " + sFoundSuggs + \
                              "\n  errors:   \n" + sListErr)
                        nError += 1
            if nError:
                print("Unexpected errors:", nError)
        # untested rules
        i = 0
        echo("Untested rules:")
        for _, sOpt, sLineId, sRuleId in gce.listRules():
            if sOpt != "@@@@" and sRuleId not in self._aTestedRules and not re.search("^[0-9]+[sp]$|^[pd]_", sRuleId):
                echo(sLineId + "/" + sRuleId)
                i += 1

        echo("[{} untested rules]".format(i))

    def _splitTestLine (self, sLine):
        sText, sSugg = sLine.split("->>")
        return (sText.strip(), sSugg.strip())

    def _getFoundErrors (self, sLine, sOption):
        if sOption: