Grammalecte  Check-in [078b376d10]

Overview
Comment:[core] tests: avoid graph rules for now
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core | rg
Files: files | file ages | folders
SHA3-256: 078b376d10d1fa188aeffd0386ce7157ab7494d58a6b5bac54adca0c89a5309c
User & Date: olr on 2018-09-19 15:32:29
Other Links: branch diff | manifest | tags
Context
2018-09-19
16:04
[fr][bug] lexicographe: détection de la fin d’un lemme Closed-Leaf check-in: e9f97a8a3d user: olr tags: fr, rg
15:32
[core] tests: avoid graph rules for now check-in: 078b376d10 user: olr tags: core, rg
15:18
[fr] màj performances (x2+) check-in: e333e35298 user: olr tags: fr, rg
Changes

Modified gc_core/js/tests.js from [7c35f52f2d] to [b8177b221a].

    80     80           catch (e) {
    81     81               helpers.logerror(e);
    82     82           }
    83     83   
    84     84           if (bShowUntested) {
    85     85               i = 0;
    86     86               for (let [sOpt, sLineId, sRuleId] of this.gce.listRules()) {
    87         -                if (!this._aRuleTested.has(sLineId) && !/^[0-9]+[sp]$|^[pd]_/.test(sRuleId)) {
    88         -                    sUntestedRules += sRuleId + ", ";
           87  +                if (sOpt !== "@@@@" && !this._aRuleTested.has(sLineId) && !/^[0-9]+[sp]$|^[pd]_/.test(sRuleId)) {
           88  +                    sUntestedRules += sLineId + "/" + sRuleId + ", ";
    89     89                       i += 1;
    90     90                   }
    91     91               }
    92     92               if (i > 0) {
    93     93                   yield sUntestedRules + "\n[" + i.toString() + " untested rules]";
    94     94               }
    95     95           }

Modified gc_lang/fr/modules/tests.py from [83f9fd0bb6] to [7a6a733de8].

   168    168                                 "\n  errors:   \n" + sListErr)
   169    169                           nError += 1
   170    170               if nError:
   171    171                   print("Unexpected errors:", nError)
   172    172           # untested rules
   173    173           i = 0
   174    174           for sOpt, sLineId, sRuleId in gce.listRules():
   175         -            if sLineId not in self._aRuleTested and not re.search("^[0-9]+[sp]$|^[pd]_", sRuleId):
   176         -                echo(sRuleId, end= ", ")
          175  +            if sOpt != "@@@@" and sLineId not in self._aRuleTested and not re.search("^[0-9]+[sp]$|^[pd]_", sRuleId):
          176  +                echo(sLineId + "/" + sRuleId, end= ", ")
   177    177                   i += 1
   178    178           if i:
   179    179               echo("\n[{} untested rules]".format(i))
   180    180   
   181    181       def _splitTestLine (self, sLine):
   182    182           sText, sSugg = sLine.split("->>")
   183    183           return (sText.strip(), sSugg.strip())