@@ -110,6 +110,8 @@ def test_kwarg_search(module, prefix):
110110 (lambda x , u , params : None , lambda zflag , params : None ), {}),
111111 (control .InputOutputSystem , 0 , 0 , (),
112112 {'inputs' : 1 , 'outputs' : 1 , 'states' : 1 }),
113+ (control .LTI , 0 , 0 , (),
114+ {'inputs' : 1 , 'outputs' : 1 , 'states' : 1 }),
113115 (control .flatsys .LinearFlatSystem , 1 , 0 , (), {}),
114116 (control .NonlinearIOSystem .linearize , 1 , 0 , (0 , 0 ), {}),
115117 (control .StateSpace .sample , 1 , 0 , (0.1 ,), {}),
@@ -156,26 +158,32 @@ def test_matplotlib_kwargs(function, nsysargs, moreargs, kwargs, mplcleanup):
156158 function (* args , ** kwargs )
157159
158160 # Now add an unrecognized keyword and make sure there is an error
159- with pytest .raises (AttributeError ,
160- match = "(has no property|unexpected keyword)" ):
161+ with pytest .raises (
162+ (AttributeError , TypeError ),
163+ match = "(has no property|unexpected keyword|unrecognized keyword)" ):
161164 function (* args , ** kwargs , unknown = None )
162165
163166
164167@pytest .mark .parametrize (
165- "data_fcn, plot_fcn" , [
166- (control .step_response , control .time_response_plot ),
167- (control .step_response , control .TimeResponseData .plot ),
168- (control .frequency_response , control .FrequencyResponseData .plot ),
169- (control .frequency_response , control .bode ),
170- (control .frequency_response , control .bode_plot ),
168+ "data_fcn, plot_fcn, mimo" , [
169+ (control .step_response , control .time_response_plot , True ),
170+ (control .step_response , control .TimeResponseData .plot , True ),
171+ (control .frequency_response , control .FrequencyResponseData .plot , True ),
172+ (control .frequency_response , control .bode , True ),
173+ (control .frequency_response , control .bode_plot , True ),
174+ (control .nyquist_response , control .nyquist_plot , False ),
171175 ])
172- def test_response_plot_kwargs (data_fcn , plot_fcn ):
176+ def test_response_plot_kwargs (data_fcn , plot_fcn , mimo ):
173177 # Create a system for testing
174- response = data_fcn (control .rss (4 , 2 , 2 ))
178+ if mimo :
179+ response = data_fcn (control .rss (4 , 2 , 2 ))
180+ else :
181+ response = data_fcn (control .rss (4 , 1 , 1 ))
175182
176183 # Make sure that calling the data function with unknown keyword errs
177- with pytest .raises ((AttributeError , TypeError ),
178- match = "(has no property|unexpected keyword)" ):
184+ with pytest .raises (
185+ (AttributeError , TypeError ),
186+ match = "(has no property|unexpected keyword|unrecognized keyword)" ):
179187 data_fcn (control .rss (2 , 1 , 1 ), unknown = None )
180188
181189 # Call the plotting function normally and make sure it works
@@ -216,6 +224,7 @@ def test_response_plot_kwargs(data_fcn, plot_fcn):
216224 'lqr' : test_unrecognized_kwargs ,
217225 'nlsys' : test_unrecognized_kwargs ,
218226 'nyquist' : test_matplotlib_kwargs ,
227+ 'nyquist_response' : test_response_plot_kwargs ,
219228 'nyquist_plot' : test_matplotlib_kwargs ,
220229 'pzmap' : test_unrecognized_kwargs ,
221230 'rlocus' : test_unrecognized_kwargs ,
@@ -245,6 +254,7 @@ def test_response_plot_kwargs(data_fcn, plot_fcn):
245254 frd_test .TestFRD .test_unrecognized_keyword ,
246255 'FrequencyResponseData.plot' : test_response_plot_kwargs ,
247256 'InputOutputSystem.__init__' : test_unrecognized_kwargs ,
257+ 'LTI.__init__' : test_unrecognized_kwargs ,
248258 'flatsys.LinearFlatSystem.__init__' : test_unrecognized_kwargs ,
249259 'NonlinearIOSystem.linearize' : test_unrecognized_kwargs ,
250260 'InterconnectedSystem.__init__' :
0 commit comments