@@ -665,41 +665,42 @@ def test_database_params(geds_raw_tbl):
665665 )
666666 assert lh5_out ["test" ][0 ] == 3
667667
668- def test_init_args (geds_raw_tbl ):
669- dsp_config = {
670- "outputs" : ["test" ],
671- "processors" : {
672- "test" : {
673- "function" : "dspeed.processors.poly_fit" ,
674- "args" : ["waveform" , "test(shape=4)" ],
675- "init_args" : ["len(waveform)" , 3 ],
676- }
677- },
678- }
679- build_dsp (geds_raw_tbl , dsp_config = dsp_config , n_entries = 1 )
680668
681- dsp_config = {
682- "outputs" : [ "test" ],
683- "processors " : {
684- "test " : {
685- "function " : "dspeed.processors.poly_fit" ,
686- "args " : [ "waveform" , "test(shape=3)" ] ,
687- "init_args " : ["len( waveform) " , 3 ],
688- }
689- },
690- }
691- with pytest . raises ( ProcessingChainError ):
692- build_dsp (geds_raw_tbl , dsp_config = dsp_config , n_entries = 1 )
693-
694- dsp_config = {
695- "outputs" : ["test" ],
696- "processors" : {
697- "test" : {
698- "function" : "dspeed.processors.poly_fit" ,
699- "args" : ["waveform" , "test(shape=4 )" ],
700- "init_args" : ["len(waveform)" , "db.deg" ],
701- "defaults" : { "db.deg" : 3 },
702- }
703- },
704- }
669+ def test_init_args ( geds_raw_tbl ):
670+ dsp_config = {
671+ "outputs " : [ "test" ],
672+ "processors " : {
673+ "test " : {
674+ "function " : "dspeed.processors.poly_fit" ,
675+ "args " : ["waveform" , "test(shape=4)" ],
676+ "init_args" : [ "len(waveform)" , 3 ],
677+ }
678+ },
679+ }
680+ build_dsp (geds_raw_tbl , dsp_config = dsp_config , n_entries = 1 )
681+
682+ dsp_config = {
683+ "outputs" : ["test" ],
684+ "processors" : {
685+ "test" : {
686+ "function" : "dspeed.processors.poly_fit" ,
687+ "args" : ["waveform" , "test(shape=3 )" ],
688+ "init_args" : [1 , 3 ],
689+ }
690+ },
691+ }
692+ with pytest . raises ( ProcessingChainError ):
705693 build_dsp (geds_raw_tbl , dsp_config = dsp_config , n_entries = 1 )
694+
695+ dsp_config = {
696+ "outputs" : ["test" ],
697+ "processors" : {
698+ "test" : {
699+ "function" : "dspeed.processors.poly_fit" ,
700+ "args" : ["waveform" , "test(shape=4)" ],
701+ "init_args" : ["len(waveform)" , "db.deg" ],
702+ "defaults" : {"db.deg" : 3 },
703+ }
704+ },
705+ }
706+ build_dsp (geds_raw_tbl , dsp_config = dsp_config , n_entries = 1 )
0 commit comments