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: fr, trunk
10:16
[fr] test: untested rules check-in: ac727cfd6b user: olr tags: fr, trunk
2020-03-20
16:30
[core] adjusst sentence detection check-in: f49fe68f6c user: olr tags: core, trunk
Changes

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

   202    202                                 "\n  found:    " + sFoundSuggs + \
   203    203                                 "\n  errors:   \n" + sListErr)
   204    204                           nError += 1
   205    205               if nError:
   206    206                   print("Unexpected errors:", nError)
   207    207           # untested rules
   208    208           i = 0
          209  +        echo("Untested rules:")
   209    210           for _, sOpt, sLineId, sRuleId in gce.listRules():
   210    211               if sOpt != "@@@@" and sRuleId not in self._aTestedRules and not re.search("^[0-9]+[sp]$|^[pd]_", sRuleId):
   211         -                echo(sLineId + "/" + sRuleId, end= ", ")
          212  +                echo(sLineId + "/" + sRuleId)
   212    213                   i += 1
   213         -        if i:
   214         -            echo("\n[{} untested rules]".format(i))
          214  +        echo("[{} untested rules]".format(i))
   215    215   
   216    216       def _splitTestLine (self, sLine):
   217    217           sText, sSugg = sLine.split("->>")
   218    218           return (sText.strip(), sSugg.strip())
   219    219   
   220    220       def _getFoundErrors (self, sLine, sOption):
   221    221           if sOption: