Overview
| Comment: | [core][fr] update suggestion tests |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk | fr | core |
| Files: | files | file ages | folders |
| SHA3-256: |
475e6bc6746d94e38d4c34c2cf043783 |
| User & Date: | olr on 2021-02-18 12:33:05 |
| Other Links: | manifest | tags |
Context
|
2021-02-18
| ||
| 17:07 | [build] extra-tests check-in: 974fc74edb user: olr tags: trunk, build | |
| 12:33 | [core][fr] update suggestion tests check-in: 475e6bc674 user: olr tags: trunk, fr, core | |
| 10:26 | [fr] remove old useless tests check-in: 15a51e51ca user: olr tags: trunk, fr | |
Changes
Modified gc_lang/fr/modules/tests_modules.py from [2556c753ce] to [c6cfb68bd7].
| ︙ | ︙ | |||
51 52 53 54 55 56 57 |
self.assertTrue(self.oSpellChecker.isValid(sWord), sWord)
def test_isvalid_failed (self):
for sWord in ["BranchE", "BRanche", "BRAnCHE", "émilie", "éMILIE", "émiLie", "aujourd'hui", "Aujourd'hui", ]:
self.assertFalse(self.oSpellChecker.isValid(sWord), sWord)
def test_suggest (self):
| | > > | > > > > > > > > | > > > | > > > > > > | | | 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
self.assertTrue(self.oSpellChecker.isValid(sWord), sWord)
def test_isvalid_failed (self):
for sWord in ["BranchE", "BRanche", "BRAnCHE", "émilie", "éMILIE", "émiLie", "aujourd'hui", "Aujourd'hui", ]:
self.assertFalse(self.oSpellChecker.isValid(sWord), sWord)
def test_suggest (self):
for sWrong, sSugg in [
("chassis", "châssis"),
("francais", "français"),
("déelirranttesss", "délirantes"),
("vallidasion", "validation"),
("Emilie", "Émilie"),
("exibission", "exhibition"),
("ditirembique", "dithyrambique"),
("jai", "j’ai"),
("email", "courriel"),
("fatiqué", "fatigué"),
("coeur", "cœur"),
("trèèèèèèèèès", "très"),
("vraaaaiiiimeeeeennnt", "vraiment"),
("apele", "appel"),
("Co2", "CO₂"),
("emmppâiiiller", "empailler"),
("testt", "test"),
("apelaion", "appellation"),
("exsepttion", "exception"),
("sintaxik", "syntaxique"),
("ebriete", "ébriété"),
("ennormmement", "énormément")
]:
#with timeblock(sWord):
for lSugg in self.oSpellChecker.suggest(sWrong):
#print(sWord, "->", " ".join(lSugg))
self.assertIn(sSugg, lSugg)
def test_lemmas (self):
for sWord, sInfi in [
("suis", "suivre"),
("suis", "être"),
("a", "avoir"),
|
| ︙ | ︙ |