From 06332f7b0d0e2cc93540d7215c92f72b707818b5 Mon Sep 17 00:00:00 2001 From: Juliettejns Date: Mon, 9 Sep 2024 11:36:49 +0200 Subject: [PATCH] =?UTF-8?q?modif=20test=20regex=20ajout=20condition=20sp?= =?UTF-8?q?=C3=A9=20Sans=20test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test_models/test_regex_filter.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_models/test_regex_filter.py b/tests/test_models/test_regex_filter.py index 21a49c9..c880468 100644 --- a/tests/test_models/test_regex_filter.py +++ b/tests/test_models/test_regex_filter.py @@ -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'}")