@@ -509,58 +509,10 @@ def test_file_writer(bec_ipython_client_fixture):
509509 dev .samy .velocity .set (100 ).wait ()
510510
511511
512- @pytest .mark .timeout (100 )
513- def test_scan_def_callback (capsys , bec_ipython_client_fixture ):
514- bec = bec_ipython_client_fixture
515- bec .metadata .update ({"unit_test" : "test_scan_def_callback" })
516- scans = bec .scans
517- dev = bec .device_manager .devices
518- scan_number = bec .queue .next_scan_number
519- with scans .scan_def :
520- scans .line_scan (dev .samx , - 5 , 5 , steps = 10 , exp_time = 0.1 , relative = False )
521- scans .umv (dev .samy , 5 , relative = False )
522- current_pos_samy = dev .samy .read (cached = True )["samy" ]["value" ]
523- captured = capsys .readouterr ()
524- assert f"Starting scan { scan_number } " in captured .out
525- ref_out_samy = f"━━━━━━━━━━━━━━━ { current_pos_samy :10.2f} / 5.00 / 100 %"
526- assert ref_out_samy in captured .out
527- scans .line_scan (dev .samx , - 5 , 5 , steps = 10 , exp_time = 0.1 , relative = False )
528- captured = capsys .readouterr ()
529- assert f"Scan { scan_number } finished." in captured .out
530-
531-
532- @pytest .mark .timeout (100 )
533- def test_scan_def (bec_ipython_client_fixture ):
534- bec = bec_ipython_client_fixture
535- bec .metadata .update ({"unit_test" : "test_scan_def" })
536- scans = bec .scans
537- dev = bec .device_manager .devices
538- scan_number = bec .queue .next_scan_number
539- with scans .scan_def :
540- scans .line_scan (dev .samx , - 5 , 5 , steps = 10 , exp_time = 0.1 , relative = False )
541- scans .umv (dev .samy , 5 , relative = False )
542- scans .line_scan (dev .samx , - 5 , 5 , steps = 10 , exp_time = 0.1 , relative = False )
543- scans .mv (dev .samx , 0 , relative = False )
544-
545- assert scan_number == bec .queue .next_scan_number - 1
546-
547- scan_number = bec .queue .next_scan_number
548-
549- @scans .scan_def
550- def scan_def_with_decorator ():
551- scans .line_scan (dev .samx , - 5 , 5 , steps = 10 , exp_time = 0.1 , relative = False )
552- scans .umv (dev .samy , 5 , relative = False )
553- scans .line_scan (dev .samx , - 5 , 5 , steps = 10 , exp_time = 0.1 , relative = False )
554- scans .mv (dev .samx , 0 , relative = False )
555-
556- scan_def_with_decorator ()
557- assert scan_number == bec .queue .next_scan_number - 1
558-
559-
560512@pytest .mark .timeout (100 )
561513def test_group_def (bec_ipython_client_fixture ):
562514 bec = bec_ipython_client_fixture
563- bec .metadata .update ({"unit_test" : "test_scan_def " })
515+ bec .metadata .update ({"unit_test" : "test_group_def " })
564516 scans = bec .scans
565517 dev = bec .device_manager .devices
566518 scan_number = bec .queue .next_scan_number
0 commit comments