Skip to content

Commit a524089

Browse files
Fix test typing
Previously there was a test which violated type-hints. As we can not keep having the test _and_ type hints on that test, the test itself was rewritten to test a semantically slightly different but similar edge case. The original test case is of course prevented when using type-hints (i.e not passing `None` to a function that doesn't accept `None`) Signed-off-by: Florian Wagner <[email protected]>
1 parent 7a26a31 commit a524089

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/config/test_util.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@ def test_load_config_dataclass(
5454
[SimpleConfig, MmSimpleConfig],
5555
ids=["dataclass", "marshmallow_dataclass"],
5656
)
57-
def test_load_config_load_None(
57+
def test_load_config_load_empty(
5858
config_class: type[SimpleConfig] | type[MmSimpleConfig],
5959
) -> None:
60-
"""Test that load_config raises ValidationError if the configuration is None."""
60+
"""Test that load_config raises ValidationError if the configuration is empty."""
6161
config: dict[str, Any] = {}
6262
with pytest.raises(marshmallow.ValidationError):
63-
_ = load_config(config_class, config.get("loggers", None))
63+
_ = load_config(config_class, config)
6464

6565

6666
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)