Grammalecte  Check-in [ff05e3b47e]

Overview
Comment:[core][fr] untested rules: display update
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | fr | core
Files: files | file ages | folders
SHA3-256: ff05e3b47e7f6197c25bce7cbd8f51833f58117eea1b3cbff904db0e5404b966
User & Date: olr on 2020-05-09 11:22:38
Other Links: manifest | tags
Context
2020-05-09
11:50
[fr] ajustements [core] remove legacy code check-in: b85ddf9604 user: olr tags: core, fr, trunk
11:22
[core][fr] untested rules: display update check-in: ff05e3b47e user: olr tags: core, fr, trunk
11:03
[fr] ajustements et faux positifs check-in: 1414c08368 user: olr tags: fr, trunk
Changes

Modified gc_lang/fr/modules/tests.py from [e401504721] to [b8be0feaa5].

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