Skip to content

Commit

Permalink
STYLE: fix styles for query unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yashaka committed Feb 2, 2025
1 parent eac23dd commit fb891ca
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tests/unit/common/_typing_fucntions__query_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ def test_query_name_and_application():
is_positive = Query('is positive', lambda x: x > 0)

assert 'is positive' == str(is_positive)
assert is_positive(1) == True
assert is_positive(0) == False
assert is_positive(1) is True
assert is_positive(0) is False


def test_query_recomposition():
Expand All @@ -24,14 +24,14 @@ def test_query_recomposition():
)

assert 'is positive incremented by 0' == str(is_positive_increented_by(0))
assert is_positive_increented_by(0)(0) == False
assert is_positive_increented_by(1)(0) == True
assert is_positive_increented_by(1)(-1) == False
assert is_positive_increented_by(2)(-1) == True
assert is_positive_increented_by(0)(0) is False
assert is_positive_increented_by(1)(0) is True
assert is_positive_increented_by(1)(-1) is False
assert is_positive_increented_by(2)(-1) is True

# TODO: consider the is_positive_increented_by(1).as('is increment positive') syntax
is_increment_positive = Query('is increment positive', is_positive_increented_by(1))

assert 'is increment positive' == str(is_increment_positive)
assert is_increment_positive(0) == True
assert is_increment_positive(-1) == False
assert is_increment_positive(0) is True
assert is_increment_positive(-1) is False

0 comments on commit fb891ca

Please sign in to comment.