Skip to content

Commit

Permalink
[config] better test register_reserved_keys
Browse files Browse the repository at this point in the history
  • Loading branch information
Chovin committed Oct 2, 2024
1 parent 9cb65b1 commit 6d3a670
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/core/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ def test_config_register_global_badvalues(config):


def test_config_register_reserved_keys(config):
for attr in vars(config):
with pytest.raises((RuntimeError, ValueError)):
config.register_global(**{"group": {"value": True}, "value": True})
for attr in [*dir(config), *dir(config.group), *dir(config.value)]:
with pytest.raises(RuntimeError):
config.register_global(**{attr: True})


Expand Down

0 comments on commit 6d3a670

Please sign in to comment.