8000 Test for correct futurewarning message · python-control/python-control@944364a · GitHub
[go: up one dir, main page]

Skip to content

Commit 944364a

Browse files
committed
Test for correct futurewarning message
1 parent 85328d9 commit 944364a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

control/tests/config_test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ def test_default_deprecation(self):
5151
ct.config.defaults['deprecated.config.oldmiss'] = 'config.newmiss'
5252

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

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

7980
with pytest.raises(KeyError):
80-
with pytest.warns(FutureWarning, match=msgpattern):
81+
with pytest.warns(FutureWarning, match=msgmisspattern):
8182
ct.config.defaults['config.oldmiss']
8283
with pytest.raises(KeyError):
8384
ct.config.defaults['config.neverdefined']

0 commit comments

Comments
 (0)
0