File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -163,13 +163,24 @@ def test_run(
163163 )
164164
165165
166+ test_matrix = (
167+ # Reverse order of list
168+ (False ,),
169+ (True ,),
170+ )
171+
172+
173+ @pytest .mark .parametrize ("test_params" , test_matrix )
166174def test_run_with_db (
167175 mocker : MockerFixture ,
168176 rsync_basepath : Path ,
169177 mock_ispyb_credentials ,
170178 murfey_db_session : SQLModelSession ,
171179 ispyb_db_session : SQLAlchemySession ,
180+ test_params : tuple [bool ],
172181):
182+ (shuffle_message ,) = test_params
183+
173184 # Create a session to insert for this test
174185 murfey_session : MurfeyDB .Session = get_or_create_db_entry (
175186 murfey_db_session ,
@@ -234,12 +245,16 @@ def test_run_with_db(
234245 rsync_basepath = rsync_basepath ,
235246 session_id = murfey_session .id ,
236247 )
248+ if shuffle_message :
249+ preprocessing_messages = reversed (preprocessing_messages )
237250 for message in preprocessing_messages :
238251 result = run (
239252 message = message ,
240253 murfey_db = murfey_db_session ,
241254 )
242255 assert result == {"success" : True }
256+ # Each message should call the align-and-merge workflow thrice
257+ # if gray and colour channels are both present
243258 assert mock_align_and_merge_call .call_count == len (preprocessing_messages ) * len (
244259 colors
245260 )
You can’t perform that action at this time.
0 commit comments