@@ -49,6 +49,7 @@ def __init__(self, test_env : Environment,
4949 validate_exists : List [Path ] = None ,
5050 validate_not_exists : List [Path ] = None ,
5151 validate_spf_closed : bool = False ,
52+ validate_spf_running : bool = False ,
5253 close_wait_time : float = tconst .CLOSE_WAIT_TIME ):
5354 super ().__init__ (test_env )
5455 self .test_root = test_root
@@ -59,6 +60,7 @@ def __init__(self, test_env : Environment,
5960 self .validate_exists = validate_exists
6061 self .validate_not_exists = validate_not_exists
6162 self .validate_spf_closed = validate_spf_closed
63+ self .validate_spf_running = validate_spf_running
6264 self .close_wait_time = close_wait_time
6365
6466 def setup (self ) -> None :
@@ -82,10 +84,7 @@ def end_execution(self) -> None:
8284 time .sleep (self .close_wait_time )
8385 self .logger .debug ("Finished Execution" )
8486
85- def test_execute (self ) -> None :
86- """Execute the test
87- """
88- self .start_spf ()
87+ def send_input (self ) -> None :
8988 if self .key_inputs is not None :
9089 for cur_input in self .key_inputs :
9190 if isinstance (cur_input , keys .Keys ):
@@ -95,6 +94,11 @@ def test_execute(self) -> None:
9594 self .env .spf_mgr .send_text_input (cur_input )
9695 time .sleep (tconst .KEY_DELAY )
9796
97+ def test_execute (self ) -> None :
98+ """Execute the test
99+ """
100+ self .start_spf ()
101+ self .send_input ()
98102 time .sleep (tconst .OPERATION_DELAY )
99103 self .end_execution ()
100104
@@ -109,6 +113,8 @@ def validate(self) -> bool:
109113 try :
110114 if self .validate_spf_closed :
111115 assert not self .env .spf_mgr .is_spf_running (), "Superfile is still running"
116+ if self .validate_spf_running :
117+ assert self .env .spf_mgr .is_spf_running (), "Superfile is not running"
112118
113119 if self .validate_exists is not None :
114120 for file_path in self .validate_exists :
0 commit comments