Skip to content

Commit

Permalink
modif test regex ajout condition spé Sans test
Browse files Browse the repository at this point in the history
  • Loading branch information
Juliettejns committed Sep 9, 2024
1 parent f4e925c commit 06332f7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_models/test_regex_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ def test_combinatory_regex(self):
self.db.session.refresh(corpus)
for category, filtre in tests:
validity = WordToken.is_valid(lemma=category, POS=token.POS, morph=token.morph, corpus=corpus)["lemma"]
if filtre and filtre in combi:
print(combi, category, filtre, validity)
if filtre and filtre in combi or 'celui' in category:
self.assertTrue(validity, f"Filters are not working. `{category}` should be matched by `{filtre}` in {', '.join(combi) or 'absence of filters'}")
else:
self.assertFalse(validity, f"Filters are not working. `{category}` should not be matched by `{filtre}` in {', '.join(combi) or 'absence of filters'}")

0 comments on commit 06332f7

Please sign in to comment.