Skip to content

Commit

Permalink
Added test for no validation of params.
Browse files Browse the repository at this point in the history
  • Loading branch information
jfcrenshaw committed Sep 29, 2022
1 parent 9fb8c36 commit 26d23f0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,15 @@ def test_bad_params(params: dict, error: Exception) -> None:
LsstErrorParams().update(**params)


def test_no_validation() -> None:
"""Test that without parameter validation, you can assign bogus params."""
# with validation, this raises a type error
with pytest.raises(TypeError):
LsstErrorParams(tvis="fake") # type: ignore
# without validation, no problem!
LsstErrorParams(tvis="fake", validate=False) # type: ignore


def test_missing_theta() -> None:
"""Test fail if we have extended error but don't have theta for everyone."""
with pytest.raises(ValueError):
Expand Down

0 comments on commit 26d23f0

Please sign in to comment.