Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion control/tests/config_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def test_default_deprecation(self):
ct.config.defaults['deprecated.config.oldmiss'] = 'config.newmiss'

msgpattern = r'config\.oldkey.* has been renamed to .*config\.newkey'
msgmisspattern = r'config\.oldmiss.* has been renamed to .*config\.newmiss'

ct.config.defaults['config.newkey'] = 1
with pytest.warns(FutureWarning, match=msgpattern):
Expand All @@ -77,7 +78,7 @@ def test_default_deprecation(self):
assert ct.config.defaults.get('config.oldkey') == 6

with pytest.raises(KeyError):
with pytest.warns(FutureWarning, match=msgpattern):
with pytest.warns(FutureWarning, match=msgmisspattern):
ct.config.defaults['config.oldmiss']
with pytest.raises(KeyError):
ct.config.defaults['config.neverdefined']
Expand Down