Skip to content

Commit ceddc6f

Browse files
committed
add test for extraneous keywords in iosys
1 parent 3656968 commit ceddc6f

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

control/iosys.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1656,14 +1656,14 @@ def input_output_response(
16561656
raise ValueError("ivp_method specified more than once")
16571657
solve_ivp_kwargs['method'] = kwargs.pop('solve_ivp_method')
16581658

1659+
# Make sure there were no extraneous keywords
1660+
if kwargs:
1661+
raise TypeError("unrecognized keywords: ", str(kwargs))
1662+
16591663
# Set the default method to 'RK45'
16601664
if solve_ivp_kwargs.get('method', None) is None:
16611665
solve_ivp_kwargs['method'] = 'RK45'
16621666

1663-
# Make sure all input arguments got parsed
1664-
if kwargs:
1665-
raise TypeError("unknown parameters %s" % kwargs)
1666-
16671667
# Sanity checking on the input
16681668
if not isinstance(sys, InputOutputSystem):
16691669
raise TypeError("System of type ", type(sys), " not valid")

0 commit comments

Comments
 (0)