@@ -272,52 +272,34 @@ def test_workflow_maximal_args(self) -> None:
272272 f"--config-file={ self .config_file_path } " ,
273273 "--num-passes=2" ,
274274 )
275- self .assertEqual ("" , completed_process .stderr )
276- self .assertEqual (
277- sorted (
278- [
279- "Creating data." ,
280- "Generating data for story 'story_generators.short_story'" ,
281- "Generating data for story 'story_generators.short_story'" ,
282- "Generating data for story 'story_generators.short_story'" ,
283- "Generating data for story 'story_generators.short_story'" ,
284- "Generating data for story 'story_generators.short_story'" ,
285- "Generating data for story 'story_generators.short_story'" ,
286- "Generating data for story 'story_generators.full_row_story'" ,
287- "Generating data for story 'story_generators.full_row_story'" ,
288- "Generating data for story 'story_generators.long_story'" ,
289- "Generating data for story 'story_generators.long_story'" ,
290- "Generating data for story 'story_generators.long_story'" ,
291- "Generating data for story 'story_generators.long_story'" ,
292- "Generating data for table 'data_type_test'" ,
293- "Generating data for table 'data_type_test'" ,
294- "Generating data for table 'no_pk_test'" ,
295- "Generating data for table 'no_pk_test'" ,
296- "Generating data for table 'person'" ,
297- "Generating data for table 'person'" ,
298- "Generating data for table 'strange_type_table'" ,
299- "Generating data for table 'strange_type_table'" ,
300- "Generating data for table 'unique_constraint_test'" ,
301- "Generating data for table 'unique_constraint_test'" ,
302- "Generating data for table 'unique_constraint_test2'" ,
303- "Generating data for table 'unique_constraint_test2'" ,
304- "Generating data for table 'test_entity'" ,
305- "Generating data for table 'test_entity'" ,
306- "Generating data for table 'hospital_visit'" ,
307- "Generating data for table 'hospital_visit'" ,
308- "Data created in 2 passes." ,
309- f"person: { 2 * (3 + 1 + 2 + 2 )} rows created." ,
310- f"hospital_visit: { 2 * (2 * 2 + 3 )} rows created." ,
311- "data_type_test: 2 rows created." ,
312- "no_pk_test: 2 rows created." ,
313- "strange_type_table: 2 rows created." ,
314- "unique_constraint_test: 2 rows created." ,
315- "unique_constraint_test2: 2 rows created." ,
316- "test_entity: 2 rows created." ,
317- "" ,
318- ]
319- ),
320- sorted (completed_process .stdout .split ("\n " )),
275+ self .assertSetEqual (
276+ {
277+ "Creating data." ,
278+ "Generating data for story 'story_generators.short_story'" ,
279+ "Generating data for story 'story_generators.full_row_story'" ,
280+ "Generating data for story 'story_generators.full_row_story'" ,
281+ "Generating data for story 'story_generators.long_story'" ,
282+ "Generating data for table 'data_type_test'" ,
283+ "Generating data for table 'no_pk_test'" ,
284+ "Generating data for table 'person'" ,
285+ "Generating data for table 'person'" ,
286+ "Generating data for table 'strange_type_table'" ,
287+ "Generating data for table 'unique_constraint_test'" ,
288+ "Generating data for table 'unique_constraint_test2'" ,
289+ "Generating data for table 'test_entity'" ,
290+ "Generating data for table 'hospital_visit'" ,
291+ "Data created in 2 passes." ,
292+ f"person: { 2 * (3 + 1 + 2 + 2 )} rows created." ,
293+ f"hospital_visit: { 2 * (2 * 2 + 3 )} rows created." ,
294+ "data_type_test: 2 rows created." ,
295+ "no_pk_test: 2 rows created." ,
296+ "strange_type_table: 2 rows created." ,
297+ "unique_constraint_test: 2 rows created." ,
298+ "unique_constraint_test2: 2 rows created." ,
299+ "test_entity: 2 rows created." ,
300+ "" ,
301+ },
302+ set (completed_process .stdout .split ("\n " )),
321303 )
322304
323305 completed_process = self .invoke (
@@ -468,13 +450,9 @@ def test_unique_constraint_fail(self) -> None:
468450 f"--stats-file={ self .stats_file_path } " ,
469451 "--num-passes=1" ,
470452 )
471- self .assertEqual ("" , completed_process .stderr )
472453 self .assertEqual (
473- "Generating data for story 'story_generators.short_story'\n "
474- "Generating data for story 'story_generators.short_story'\n "
475454 "Generating data for story 'story_generators.short_story'\n "
476455 "Generating data for story 'story_generators.full_row_story'\n "
477- "Generating data for story 'story_generators.long_story'\n "
478456 "Generating data for story 'story_generators.long_story'\n " ,
479457 completed_process .stdout ,
480458 )
@@ -483,17 +461,14 @@ def test_unique_constraint_fail(self) -> None:
483461 "create-data" ,
484462 f"--config-file={ self .config_file_path } " ,
485463 f"--orm-file={ self .alt_orm_file_path } " ,
464+ f"--stats-file={ self .stats_file_path } " ,
486465 "--num-passes=3" ,
487466 )
488- self .assertEqual ("" , completed_process .stderr )
489467 self .assertEqual (
490468 (
491- "Generating data for story 'story_generators.short_story'\n "
492- "Generating data for story 'story_generators.short_story'\n "
493469 "Generating data for story 'story_generators.short_story'\n "
494470 "Generating data for story 'story_generators.full_row_story'\n "
495471 "Generating data for story 'story_generators.long_story'\n "
496- "Generating data for story 'story_generators.long_story'\n "
497472 )
498473 * 3 ,
499474 completed_process .stdout ,
@@ -504,6 +479,7 @@ def test_unique_constraint_fail(self) -> None:
504479 "create-data" ,
505480 f"--config-file={ self .config_file_path } " ,
506481 f"--orm-file={ self .alt_orm_file_path } " ,
482+ f"--stats-file={ self .stats_file_path } " ,
507483 "--num-passes=1" ,
508484 expected_error = (
509485 "Failed to satisfy unique constraints for table unique_constraint_test"
0 commit comments