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
81
82
83
84
85
86
87
88


89
90
91
92
93
94
95
80
81
82
83
84
85
86


87
88
89
90
91
92
93
94
95







-
-
+
+







        catch (e) {
            helpers.logerror(e);
        }

        if (bShowUntested) {
            i = 0;
            for (let [sOpt, sLineId, sRuleId] of this.gce.listRules()) {
                if (!this._aRuleTested.has(sLineId) && !/^[0-9]+[sp]$|^[pd]_/.test(sRuleId)) {
                    sUntestedRules += sRuleId + ", ";
                if (sOpt !== "@@@@" && !this._aRuleTested.has(sLineId) && !/^[0-9]+[sp]$|^[pd]_/.test(sRuleId)) {
                    sUntestedRules += sLineId + "/" + sRuleId + ", ";
                    i += 1;
                }
            }
            if (i > 0) {
                yield sUntestedRules + "\n[" + i.toString() + " untested rules]";
            }
        }

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

168
169
170
171
172
173
174
175
176


177
178
179
180
181
182
183
168
169
170
171
172
173
174


175
176
177
178
179
180
181
182
183







-
-
+
+







                              "\n  errors:   \n" + sListErr)
                        nError += 1
            if nError:
                print("Unexpected errors:", nError)
        # untested rules
        i = 0
        for sOpt, sLineId, sRuleId in gce.listRules():
            if sLineId not in self._aRuleTested and not re.search("^[0-9]+[sp]$|^[pd]_", sRuleId):
                echo(sRuleId, end= ", ")
            if sOpt != "@@@@" and sLineId not in self._aRuleTested 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())