Skip to content

Commit

Permalink
fixed linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Nargis Sultani committed Sep 12, 2023
1 parent da950b6 commit 44612d8
Showing 1 changed file with 24 additions and 21 deletions.
45 changes: 24 additions & 21 deletions src/tests/test_check_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,27 @@
import pytest

from validator import global_data
from validator.check_functions import (has_correct_length,
has_no_conditional_field_conflict,
has_valid_enum_pair,
has_valid_fieldset_pair,
has_valid_format,
has_valid_multi_field_value_count,
has_valid_value_count, is_date,
is_greater_than,
is_greater_than_or_equal_to,
is_less_than, is_number,
is_unique_column, is_unique_in_field,
is_valid_code, is_valid_enum,
meets_multi_value_field_restriction,
string_contains)
from validator.check_functions import (
has_correct_length,
has_no_conditional_field_conflict,
has_valid_enum_pair,
has_valid_fieldset_pair,
has_valid_format,
has_valid_multi_field_value_count,
has_valid_value_count,
is_date,
is_greater_than,
is_greater_than_or_equal_to,
is_less_than,
is_number,
is_unique_column,
is_unique_in_field,
is_valid_code,
is_valid_enum,
meets_multi_value_field_restriction,
string_contains,
)
from validator.checks import SBLCheck


class TestInvalidDateFormat:
Expand Down Expand Up @@ -864,11 +871,6 @@ def test_with_incorrect_values(self):
is False
)

class TestSBLCheck:
import pytest

from validator.checks import SBLCheck


class TestSBLCheck:
def test_no_id_check(self):
Expand All @@ -884,10 +886,11 @@ def test_no_name_check(self):

assert "Each check must be assigned a `name` and an `id`." in str(exc.value)
assert exc.type == ValueError

def test_name_and_id_check(self):
raised = False
try:
SBLCheck(lambda: True, id="00000", warning=True, name="Just a Warning")
except:
except ValueError:
raised = True
assert raised == False
assert raised is False

0 comments on commit 44612d8

Please sign in to comment.