Skip to content

Commit

Permalink
updated pydantic version to 2.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
RabiyaF committed Sep 26, 2023
1 parent 6f329ed commit 3c8bcac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
numpy >= 1.20
pydantic >= 2.0.3
pydantic >= 2.4.0
pytest >= 7.4.0
pytest-cov >= 4.1.0
StrEnum >= 0.4.15
Expand Down
4 changes: 2 additions & 2 deletions tests/test_controls.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def test_base_parallel_validation(self, var1: str, var2: Any) -> None:
"""Tests the parallel setter validation in BaseProcedure class."""
with pytest.raises(pydantic.ValidationError) as exp:
setattr(self.base_procedure, 'parallel', var1)
assert exp.value.errors()[0]['msg'] == "Input should be 'single','points','contrasts' or 'all'"
assert exp.value.errors()[0]['msg'] == "Input should be 'single', 'points', 'contrasts' or 'all'"
with pytest.raises(pydantic.ValidationError) as exp:
setattr(self.base_procedure, 'parallel', var2)
assert exp.value.errors()[0]['msg'] == "Input should be a valid string"
Expand All @@ -55,7 +55,7 @@ def test_base_display_validation(self, var1: str, var2: Any) -> None:
"""Tests the display setter validation in BaseProcedure class."""
with pytest.raises(pydantic.ValidationError) as exp:
setattr(self.base_procedure, 'display', var1)
assert exp.value.errors()[0]['msg'] == "Input should be 'off','iter','notify' or 'final'"
assert exp.value.errors()[0]['msg'] == "Input should be 'off', 'iter', 'notify' or 'final'"
with pytest.raises(pydantic.ValidationError) as exp:
setattr(self.base_procedure, 'display', var2)
assert exp.value.errors()[0]['msg'] == "Input should be a valid string"
Expand Down

0 comments on commit 3c8bcac

Please sign in to comment.