Skip to content

Commit

Permalink
Black formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
MoessnerFabian(Group) committed Dec 19, 2024
1 parent fb9ba98 commit e36a9da
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions tests/unit/filter/test_lucene_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ def test_create_filter_error(self, testcase, input_str, message):

def test_creates_lucene_compliance_filter_two_matching_regex_keys_of_two(self):
lucene_filter = LuceneFilter.create(
'regex_key_one: /.*value.*/ AND regex_key_two: /.*value.*/',
"regex_key_one: /.*value.*/ AND regex_key_two: /.*value.*/",
)

assert lucene_filter == And(
Expand All @@ -474,9 +474,7 @@ def test_creates_StringFilter_not_Regex(self):
assert lucene_filter == StringFilterExpression(["regex_key_one"], "/.*value.*/")

def test_new_lucene_compliance(self):
lucene_filter = LuceneFilter.create(
'regex_key_one:/.*value.*/'
)
lucene_filter = LuceneFilter.create("regex_key_one:/.*value.*/")

assert lucene_filter == RegExFilterExpression(["regex_key_one"], ".*value.*")

Expand All @@ -485,19 +483,17 @@ def test_creates_lucene_compliance_filter_one_matching_one_missmatch_regex_key_o
'regex_key_one:/.*value.*/ AND key_two: "/.*value.*/"',
)

assert lucene_filter == And(RegExFilterExpression(["regex_key_one"], ".*value.*"),
StringFilterExpression(["key_two"], "/.*value.*/"))
assert lucene_filter == And(
RegExFilterExpression(["regex_key_one"], ".*value.*"),
StringFilterExpression(["key_two"], "/.*value.*/"),
)

def test_new_lucene_compliance_double_escape(self):
lucene_filter = LuceneFilter.create(
'regex_key_one:/\\/.*value.*/'
)
lucene_filter = LuceneFilter.create("regex_key_one:/\\/.*value.*/")

assert lucene_filter == RegExFilterExpression(["regex_key_one"], "\/.*value.*")

def test_new_lucene_compliance_single_escape(self):
lucene_filter = LuceneFilter.create(
'regex_key_one:/\/.*value.*/'
)
lucene_filter = LuceneFilter.create("regex_key_one:/\/.*value.*/")

assert lucene_filter == RegExFilterExpression(["regex_key_one"], "\/.*value.*")
assert lucene_filter == RegExFilterExpression(["regex_key_one"], "\/.*value.*")

0 comments on commit e36a9da

Please sign in to comment.