-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtmp_test_list.txt
More file actions
17820 lines (16715 loc) · 863 KB
/
tmp_test_list.txt
File metadata and controls
17820 lines (16715 loc) · 863 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
============================= test session starts =============================
platform win32 -- Python 3.11.9, pytest-9.0.2, pluggy-1.6.0 -- c:\storycore-engine\.venv\Scripts\python.exe
cachedir: .pytest_cache
hypothesis profile 'default'
rootdir: C:\storycore-engine
configfile: pytest.ini (WARNING: ignoring pytest config in pyproject.toml!)
testpaths: tests
plugins: anyio-4.12.1, hypothesis-6.150.0, asyncio-1.3.0, cov-7.0.0, mock-3.15.1
asyncio: mode=Mode.STRICT, debug=False, asyncio_default_fixture_loop_scope=None, asyncio_default_test_loop_scope=function
collecting ... collected 5890 items / 1 skipped
<Dir storycore-engine>
<Package tests>
<Package automation>
<Module test_character_grid.py>
Tests pour le module Character Grid Automation
<Class TestGridSize>
Tests pour l'ÚnumÚration GridSize
<Function test_grid_sizes>
VÚrifie les tailles de grille
<Class TestCharacterPose>
Tests pour l'ÚnumÚration CharacterPose
<Function test_basic_poses>
VÚrifie les poses de base
<Function test_action_poses>
VÚrifie les poses d'action
<Class TestCharacterOutfit>
Tests pour l'ÚnumÚration CharacterOutfit
<Function test_outfits>
VÚrifie les tenues
<Class TestExpression>
Tests pour l'ÚnumÚration Expression
<Function test_expressions>
VÚrifie les expressions
<Class TestCharacterGridConfig>
Tests pour la classe CharacterGridConfig
<Function test_default_config>
Test la configuration par dÚfaut
<Function test_custom_config>
Test une configuration personnalisÚe
<Function test_config_to_dict>
Test la sÚrialisation de la configuration
<Class TestGridCell>
Tests pour la classe GridCell
<Function test_create_cell>
Test la crÚation d'une cellule
<Function test_cell_to_dict>
Test la sÚrialisation d'une cellule
<Class TestCharacterGridAutomation>
Tests pour la classe CharacterGridAutomation
<Function test_initialization>
Test l'initialisation
<Function test_generate_character_grid_2x2>
Test la gÚnÚration d'une grille 2x2
<Function test_generate_character_grid_3x3>
Test la gÚnÚration d'une grille 3x3
<Function test_get_bundle_by_id>
Test la rÚcupÚration d'un bundle par ID
<Function test_get_character_bundles>
Test la rÚcupÚration des bundles d'un personnage
<Function test_get_latest_bundle>
Test la rÚcupÚration du bundle le plus rÚcent
<Function test_get_grid_layout>
Test la rÚcupÚration des layouts de grille
<Function test_get_available_options>
Test la rÚcupÚration des options disponibles
<Function test_clear_history>
Test l'effacement de l'historique
<Class TestCharacterGridBundle>
Tests pour la classe CharacterGridBundle
<Function test_bundle_to_dict>
Test la sÚrialisation d'un bundle
<Module test_dialogue_automation.py>
Tests pour le module Dialogue Automation
<Class TestDialogueContext>
Tests pour la classe DialogueContext
<Function test_default_context>
Test la crÚation d'un contexte par dÚfaut
<Function test_custom_context>
Test la crÚation d'un contexte personnalisÚ
<Function test_context_to_dict>
Test la sÚrialisation en dictionnaire
<Class TestDialogueLine>
Tests pour la classe DialogueLine
<Function test_create_line>
Test la crÚation d'une ligne de dialogue
<Function test_line_to_dict>
Test la sÚrialisation d'une ligne
<Function test_line_display>
Test l'affichage d'une ligne
<Class TestDialogueAutomation>
Tests pour la classe DialogueAutomation
<Function test_initialization>
Test l'initialisation
<Function test_generate_dialogue_single_character>
Test la gÚnÚration de dialogue avec un personnage
<Function test_generate_dialogue_multiple_characters>
Test la gÚnÚration de dialogue avec plusieurs personnages
<Function test_get_dialogue_history>
Test la rÚcupÚration de l'historique
<Function test_get_scene_by_id>
Test la rÚcupÚration d'une scÞne par ID
<Function test_clear_history>
Test l'effacement de l'historique
<Class TestDialogueTypes>
Tests pour les types de dialogue
<Function test_dialogue_types_exist>
VÚrifie que tous les types existent
<Function test_emotion_intensities>
VÚrifie les intensitÚs Úmotionnelles
<Package comfyui_integration>
<Module test_cli.py>
Unit tests for CLI interface.
Tests argument parsing, configuration, and test selection logic.
Requirements: 8.1, 8.2, 8.3, 8.4, 8.5, 8.6
<Class TestArgumentParsing>
Test command-line argument parsing.
<Function test_default_arguments>
Test parsing with no arguments uses defaults.
<Function test_url_argument>
Test --url argument parsing.
<Function test_output_dir_argument>
Test --output-dir argument parsing.
<Function test_timeout_argument>
Test --timeout argument parsing.
<Function test_test_type_argument>
Test --test-type argument parsing.
<Function test_workflows_dir_argument>
Test --workflows-dir argument parsing.
<Function test_multiple_prompts>
Test multiple --prompt arguments.
<Function test_poll_interval_argument>
Test --poll-interval argument parsing.
<Function test_verbose_flag>
Test --verbose flag.
<Function test_no_report_flag>
Test --no-report flag.
<Class TestConfigurationFromArgs>
Test configuration creation from arguments and environment variables.
<Function test_config_from_default_args>
Test config creation with default arguments.
<Function test_config_from_command_line_args>
Test config creation with command-line arguments.
<Function test_config_from_environment_variables>
Test config creation with environment variables.
<Function test_command_line_overrides_environment>
Test that command-line arguments override environment variables.
<Function test_custom_prompts_override_defaults>
Test that custom prompts override default prompts.
<Class TestTestSelection>
Test test selection logic.
<Function test_test_type_from_argument>
Test test type selection from command-line argument.
<Function test_test_type_from_environment>
Test test type selection from environment variable.
<Function test_invalid_test_type_rejected>
Test that invalid test types are rejected.
<Class TestExitCodes>
Test exit code behavior.
<Function test_help_exits_with_zero>
Test that --help exits with code 0.
<Module test_connection_manager.py>
Unit tests for ComfyUIConnectionManager.
Tests connection management, health checks, authentication, and error handling.
<Class TestComfyUIConnectionManager>
Test ComfyUIConnectionManager functionality.
<Function test_initialization>
Test ConnectionManager initialization.
<Function test_initialization_with_auth>
Test ConnectionManager initialization with authentication.
<Function test_base_url_trailing_slash_removed>
Test that trailing slash is removed from base_url.
<Coroutine test_connect_success>
Test successful connection.
<Coroutine test_connect_server_unreachable>
Test connection when server is unreachable.
<Coroutine test_connect_authentication_failure>
Test connection with authentication failure.
<Coroutine test_connect_timeout>
Test connection timeout.
<Coroutine test_check_health_success>
Test successful health check.
<Coroutine test_get_request_success>
Test successful GET request.
<Coroutine test_get_request_404>
Test GET request with 404 error.
<Coroutine test_post_request_success>
Test successful POST request.
<Coroutine test_post_request_timeout>
Test POST request timeout.
<Coroutine test_close_cleanup>
Test close method cleans up resources.
<Coroutine test_context_manager>
Test async context manager usage.
<Module test_integration_real_comfyui.py>
Integration tests for real ComfyUI backend.
These tests require a running ComfyUI instance with the required models installed.
Run with: pytest tests/comfyui_integration/test_integration_real_comfyui.py -m integration
Requirements:
- ComfyUI running on http://localhost:8000 (or configured URL)
- z_image_turbo_bf16.safetensors model installed
- LTX2 models installed
- Workflows in assets/workflows/
<Class TestFluxTurboImageGeneration>
Integration tests for Flux Turbo image generation.
Requirements: 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7
<Coroutine test_flux_turbo_image_generation_basic>
Test basic Flux Turbo image generation.
Requirements: 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7
Steps:
1. Load z_image_turbo_generation.json workflow
2. Inject test prompt
3. Submit workflow and get prompt_id
4. Poll for completion
5. Download output image
6. Validate image quality
7. Save to output directory
<Coroutine test_flux_turbo_multiple_prompts>
Test Flux Turbo with multiple different prompts.
Requirements: 2.1, 2.2, 2.3, 2.4, 2.5
<Coroutine test_flux_turbo_with_test_runner>
Test Flux Turbo using the high-level test runner.
Requirements: 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7
<Class TestLTX2VideoGeneration>
Integration tests for LTX2 video generation.
Requirements: 3.1, 3.2, 3.3, 3.6, 3.7, 3.8
<Coroutine test_ltx2_video_generation_basic>
Test basic LTX2 video generation from image.
Requirements: 3.1, 3.2, 3.3, 3.6, 3.7, 3.8
Steps:
1. Load ltx2_image_to_video.json workflow
2. Inject image path and prompt
3. Submit workflow and get prompt_id
4. Poll for completion
5. Download output video
6. Validate video quality
7. Save to output directory
<Coroutine test_ltx2_with_different_prompts>
Test LTX2 with different camera movement prompts.
Requirements: 3.1, 3.2, 3.3
<Coroutine test_ltx2_with_test_runner>
Test LTX2 using the high-level test runner.
Requirements: 3.1, 3.2, 3.3, 3.6, 3.7, 3.8
<Coroutine test_ltx2_video_format_validation>
Test that LTX2 output meets format requirements.
Requirements: 3.7, 3.8
<Class TestFullPipeline>
Integration tests for complete pipeline: text \u2192 image \u2192 video.
Requirements: 4.1, 4.2, 4.3, 4.4, 4.5
<Coroutine test_full_pipeline_text_to_video>
Test complete pipeline from text prompt to final video.
Requirements: 4.1, 4.2, 4.3, 4.4, 4.5
Steps:
1. Generate image using Flux Turbo
2. Use generated image as input for LTX2
3. Generate video from image
4. Validate both outputs
5. Verify image was used as video input
6. Save all outputs
<Coroutine test_full_pipeline_with_test_runner>
Test complete pipeline using the high-level test runner.
Requirements: 4.1, 4.2, 4.3, 4.4, 4.5
<Coroutine test_pipeline_execution_order>
Test that pipeline executes in correct order: image first, then video.
Requirements: 4.1
<Coroutine test_pipeline_output_chaining>
Test that generated image is correctly used as video input.
Requirements: 4.2, 4.4
<Coroutine test_pipeline_all_outputs_saved>
Test that all pipeline outputs are saved to the correct directory.
Requirements: 4.3, 4.5
<Class TestErrorScenarios>
Integration tests for error handling scenarios.
Requirements: 6.1, 6.2, 6.3, 6.4, 6.5, 6.6
<Coroutine test_comfyui_not_running>
Test behavior when ComfyUI is not running.
Requirements: 6.1
<Coroutine test_workflow_file_not_found>
Test behavior when workflow file is missing.
Requirements: 6.3
<Coroutine test_invalid_workflow_json>
Test behavior when workflow JSON is invalid.
Requirements: 6.3
<Coroutine test_workflow_execution_timeout>
Test timeout handling during workflow execution.
Requirements: 6.5
<Coroutine test_missing_model_error_message>
Test that missing model errors are reported clearly.
Requirements: 6.2
Note: This test assumes the workflow will fail if models are missing.
The actual error depends on ComfyUI's response.
<Coroutine test_error_logging_completeness>
Test that errors are logged with sufficient detail.
Requirements: 6.6
<Coroutine test_connection_error_recovery>
Test that connection errors are handled gracefully.
Requirements: 6.1, 6.6
<Coroutine test_validation_error_messages>
Test that validation errors provide clear messages.
Requirements: 6.6
<Coroutine test_workflow_submission_error_handling>
Test error handling during workflow submission.
Requirements: 6.4
<Coroutine test_output_download_error_handling>
Test error handling when output download fails.
Requirements: 6.4, 6.6
<Module test_output_manager.py>
Unit tests for OutputManager
Tests the output organization, report generation, and file management
functionality of the OutputManager class.
Requirements: 9.1, 9.2, 9.3, 9.4, 9.5
<Class TestOutputManagerInit>
Test OutputManager initialization.
<Function test_init_creates_output_directory>
Test that initialization creates the output directory.
<Function test_init_with_existing_directory>
Test initialization with an existing directory.
<Class TestTimestampedDirectory>
Test timestamped directory creation.
<Function test_create_timestamped_directory>
Test creating a timestamped directory.
<Function test_current_run_dir_is_set>
Test that current_run_dir is set after creation.
<Function test_multiple_timestamped_directories>
Test creating multiple timestamped directories.
<Class TestFilenameGeneration>
Test filename generation.
<Function test_generate_filename_with_timestamp>
Test generating filename with provided timestamp.
<Function test_generate_filename_without_timestamp>
Test generating filename with auto-generated timestamp.
<Function test_generate_filename_different_extensions>
Test generating filenames with different extensions.
<Class TestSaveOutput>
Test saving output files.
<Function test_save_output_creates_type_directory>
Test that save_output creates type-specific directory.
<Function test_save_output_copies_file>
Test that save_output copies the file correctly.
<Function test_save_output_generates_descriptive_filename>
Test that save_output generates descriptive filename.
<Function test_save_output_different_test_types>
Test saving outputs for different test types.
<Function test_save_output_creates_run_dir_if_needed>
Test that save_output creates run directory if not exists.
<Class TestGenerateReport>
Test report generation.
<Function test_generate_report_creates_json_file>
Test that generate_report creates a JSON file.
<Function test_generate_report_contains_metadata>
Test that report contains required metadata.
<Function test_generate_report_calculates_summary>
Test that report calculates summary statistics correctly.
<Function test_generate_report_includes_config>
Test that report includes configuration.
<Class TestOrganizeByType>
Test organizing files by type.
<Function test_organize_by_type_single_file>
Test organizing a single file by type.
<Function test_organize_by_type_multiple_files>
Test organizing multiple files by type.
<Function test_organize_by_type_skips_missing_files>
Test that organize_by_type skips non-existent files.
<Class TestLogOutputPath>
Test output path logging.
<Function test_log_output_path_with_description>
Test logging output path with description.
<Function test_log_output_path_without_description>
Test logging output path without description.
<Class TestCleanupOldRuns>
Test cleanup of old run directories.
<Function test_cleanup_old_runs_keeps_recent>
Test that cleanup keeps the most recent runs.
<Function test_cleanup_old_runs_removes_oldest>
Test that cleanup removes the oldest directories.
<Class TestGetCurrentRunDir>
Test getting current run directory.
<Function test_get_current_run_dir_before_creation>
Test getting current run dir before it's created.
<Function test_get_current_run_dir_after_creation>
Test getting current run dir after creation.
<Module test_quality_validator.py>
Unit tests for QualityValidator
Tests validation of images and videos including format checks,
size validation, and metadata extraction.
<Class TestQualityValidator>
Test suite for QualityValidator class.
<Function test_validate_image_success>
Test successful image validation.
<Function test_validate_image_file_not_found>
Test image validation when file doesn't exist.
<Function test_validate_image_invalid_format>
Test image validation with invalid format.
<Function test_validate_image_too_small>
Test image validation when file is too small.
<Function test_validate_image_jpeg_format>
Test image validation with JPEG format.
<Function test_validate_video_file_not_found>
Test video validation when file doesn't exist.
<Function test_validate_video_invalid_format>
Test video validation with invalid format.
<Function test_validate_video_too_small>
Test video validation when file is too small.
<Function test_check_file_format_png>
Test format checking for PNG files.
<Function test_check_file_format_jpeg>
Test format checking for JPEG files.
<Function test_check_file_format_invalid_extension>
Test format checking with invalid extension.
<Function test_check_file_size_valid>
Test size checking with valid file size.
<Function test_check_file_size_too_small>
Test size checking when file is too small.
<Function test_check_file_size_too_large>
Test size checking when file is too large.
<Function test_get_image_dimensions>
Test getting image dimensions.
<Function test_get_image_dimensions_invalid_file>
Test getting dimensions from invalid file.
<Function test_validation_result_structure>
Test ValidationResult structure and fields.
<Function test_validation_result_error_messages>
Test that validation errors provide specific messages.
<Module test_test_runner.py>
Unit tests for ComfyUITestRunner
Tests the test orchestration functionality including image generation,
video generation, and pipeline tests.
<Class TestComfyUITestRunner>
Test suite for ComfyUITestRunner.
<Function test_init>
Test test runner initialization.
<Coroutine test_run_image_generation_test_success>
Test successful image generation test.
<Coroutine test_run_image_generation_test_failure>
Test image generation test with failure.
<Coroutine test_run_video_generation_test_success>
Test successful video generation test.
<Coroutine test_run_pipeline_test_success>
Test successful pipeline test.
<Coroutine test_run_all_tests>
Test running all tests.
<Function test_generate_report>
Test report generation.
<Coroutine test_context_manager>
Test async context manager.
<Module test_workflow_executor.py>
Unit tests for WorkflowExecutor class.
Tests workflow loading, parameter injection, execution, polling, and output download.
<Class TestWorkflowExecutorInit>
Test WorkflowExecutor initialization.
<Function test_init_with_valid_directory>
Test initialization with valid workflows directory.
<Function test_init_with_nonexistent_directory>
Test initialization with non-existent directory logs warning.
<Class TestLoadWorkflow>
Test workflow loading functionality.
<Function test_load_workflow_success>
Test successful workflow loading.
<Function test_load_workflow_not_found>
Test loading non-existent workflow raises FileNotFoundError.
<Function test_load_workflow_invalid_json>
Test loading invalid JSON raises JSONDecodeError.
<Class TestInjectParameters>
Test parameter injection functionality.
<Function test_inject_prompt_flux_turbo>
Test injecting prompt into Flux Turbo workflow.
<Function test_inject_seed>
Test injecting seed parameter.
<Function test_inject_dimensions>
Test injecting width and height parameters.
<Function test_inject_steps>
Test injecting steps parameter.
<Function test_inject_image_path_ltx2>
Test injecting image path into LTX2 workflow.
<Function test_inject_video_prompt_ltx2>
Test injecting video prompt into LTX2 workflow.
<Function test_inject_multiple_parameters>
Test injecting multiple parameters at once.
<Class TestExecuteWorkflow>
Test workflow execution functionality.
<Coroutine test_execute_workflow_success>
Test successful workflow execution.
<Coroutine test_execute_workflow_no_prompt_id>
Test execution failure when no prompt_id in response.
<Coroutine test_execute_workflow_connection_error>
Test execution failure due to connection error.
<Class TestWaitForCompletion>
Test workflow completion polling functionality.
<Coroutine test_wait_for_completion_success>
Test successful completion polling.
<Coroutine test_wait_for_completion_with_outputs>
Test completion detection via outputs field.
<Coroutine test_wait_for_completion_timeout>
Test timeout during polling.
<Coroutine test_wait_for_completion_error>
Test execution error detection.
<Class TestDownloadOutput>
Test output download functionality.
<Coroutine test_download_output_image_success>
Test successful image download.
<Coroutine test_download_output_video_success>
Test successful video download.
<Coroutine test_download_output_no_outputs>
Test download failure when no outputs in result.
<Coroutine test_download_output_no_files>
Test download failure when no files in outputs.
<Coroutine test_download_output_http_error>
Test download failure due to HTTP error.
<Dir comics>
<Module test_comic_generator.py>
Comic Generator Addon - Tests
Tests for narrative adapter, pipeline, and panel generator.
<UnitTestCase TestTypes>
A class whose instances are single test cases.
By default, the test code itself should be placed in a method named
'runTest'.
If the fixture may be used for many test cases, create as
many test methods as are needed. When instantiating such a TestCase
subclass, specify in the constructor arguments the name of the test method
that the instance is to execute.
Test authors should subclass TestCase for their own tests. Construction
and deconstruction of the test's environment ('fixture') can be
implemented by overriding the 'setUp' and 'tearDown' methods respectively.
If it is necessary to override the __init__ method, the base class
__init__ method must always be called. It is important that subclasses
should not change the signature of their __init__ method, since instances
of the classes are instantiated automatically by parts of the framework
in order to be run.
When subclassing TestCase, you can set these attributes:
* failureException: determines which exception will be raised when
the instance's assertion methods fail; test methods raising this
exception will be deemed to have 'failed' rather than 'errored'.
* longMessage: determines whether long messages (including repr of
objects used in assert methods) will be printed on failure in *addition*
to any explicit message passed.
* maxDiff: sets the maximum length of a diff in failure messages
by assert methods using difflib. It is looked up as an instance
attribute so can be configured by individual tests if required.
<TestCaseFunction test_comic_style_values>
<TestCaseFunction test_dialogue_line>
<TestCaseFunction test_narrative_beat_values>
<UnitTestCase TestNarrativeAdapter>
A class whose instances are single test cases.
By default, the test code itself should be placed in a method named
'runTest'.
If the fixture may be used for many test cases, create as
many test methods as are needed. When instantiating such a TestCase
subclass, specify in the constructor arguments the name of the test method
that the instance is to execute.
Test authors should subclass TestCase for their own tests. Construction
and deconstruction of the test's environment ('fixture') can be
implemented by overriding the 'setUp' and 'tearDown' methods respectively.
If it is necessary to override the __init__ method, the base class
__init__ method must always be called. It is important that subclasses
should not change the signature of their __init__ method, since instances
of the classes are instantiated automatically by parts of the framework
in order to be run.
When subclassing TestCase, you can set these attributes:
* failureException: determines which exception will be raised when
the instance's assertion methods fail; test methods raising this
exception will be deemed to have 'failed' rather than 'errored'.
* longMessage: determines whether long messages (including repr of
objects used in assert methods) will be printed on failure in *addition*
to any explicit message passed.
* maxDiff: sets the maximum length of a diff in failure messages
by assert methods using difflib. It is looked up as an instance
attribute so can be configured by individual tests if required.
<TestCaseFunction test_generate_page_script_all_styles>
Test that all comic styles produce valid pages.
<TestCaseFunction test_generate_page_script_basic>
Test basic page script generation (sync wrapper).
<TestCaseFunction test_get_character_visual_signature_hero>
<TestCaseFunction test_get_character_visual_signature_villain>
<TestCaseFunction test_narrative_continuity_checkpoint>
Test that an existing checkpoint is properly used for continuity.
<TestCaseFunction test_panels_have_required_fields>
Verify each panel has all required fields populated.
<TestCaseFunction test_select_narrative_beat_climax>
<TestCaseFunction test_select_narrative_beat_early_story>
<TestCaseFunction test_select_narrative_beat_mid_tension>
<TestCaseFunction test_select_narrative_beat_resolution>
<UnitTestCase TestComicPipeline>
A class whose instances are single test cases.
By default, the test code itself should be placed in a method named
'runTest'.
If the fixture may be used for many test cases, create as
many test methods as are needed. When instantiating such a TestCase
subclass, specify in the constructor arguments the name of the test method
that the instance is to execute.
Test authors should subclass TestCase for their own tests. Construction
and deconstruction of the test's environment ('fixture') can be
implemented by overriding the 'setUp' and 'tearDown' methods respectively.
If it is necessary to override the __init__ method, the base class
__init__ method must always be called. It is important that subclasses
should not change the signature of their __init__ method, since instances
of the classes are instantiated automatically by parts of the framework
in order to be run.
When subclassing TestCase, you can set these attributes:
* failureException: determines which exception will be raised when
the instance's assertion methods fail; test methods raising this
exception will be deemed to have 'failed' rather than 'errored'.
* longMessage: determines whether long messages (including repr of
objects used in assert methods) will be printed on failure in *addition*
to any explicit message passed.
* maxDiff: sets the maximum length of a diff in failure messages
by assert methods using difflib. It is looked up as an instance
attribute so can be configured by individual tests if required.
<TestCaseFunction test_export_no_state_fails_gracefully>
Export fails gracefully when no state exists.
<TestCaseFunction test_export_to_json>
Test JSON export after generating pages.
<TestCaseFunction test_generate_next_page_no_images>
Full pipeline run without image generation.
<TestCaseFunction test_init_and_load_state>
Test state initialization and persistence.
<TestCaseFunction test_load_page>
Test loading a previously generated page.
<TestCaseFunction test_load_state_nonexistent>
Loading state for a non-existent project returns None.
<TestCaseFunction test_multiple_page_generation>
Test generating multiple pages maintains progression.
<TestCaseFunction test_page_json_is_saved>
Verify page JSON is persisted to disk after generation.
<TestCaseFunction test_placeholder_svgs_are_created>
Verify placeholder SVG files are created for each panel.
<TestCaseFunction test_regenerate_panel>
Test panel regeneration updates the image path.
<UnitTestCase TestPanelGenerator>
A class whose instances are single test cases.
By default, the test code itself should be placed in a method named
'runTest'.
If the fixture may be used for many test cases, create as
many test methods as are needed. When instantiating such a TestCase
subclass, specify in the constructor arguments the name of the test method
that the instance is to execute.
Test authors should subclass TestCase for their own tests. Construction
and deconstruction of the test's environment ('fixture') can be
implemented by overriding the 'setUp' and 'tearDown' methods respectively.
If it is necessary to override the __init__ method, the base class
__init__ method must always be called. It is important that subclasses
should not change the signature of their __init__ method, since instances
of the classes are instantiated automatically by parts of the framework
in order to be run.
When subclassing TestCase, you can set these attributes:
* failureException: determines which exception will be raised when
the instance's assertion methods fail; test methods raising this
exception will be deemed to have 'failed' rather than 'errored'.
* longMessage: determines whether long messages (including repr of
objects used in assert methods) will be printed on failure in *addition*
to any explicit message passed.
* maxDiff: sets the maximum length of a diff in failure messages
by assert methods using difflib. It is looked up as an instance
attribute so can be configured by individual tests if required.
<TestCaseFunction test_placeholder_svg_contains_panel_info>
Verify SVG placeholder contains relevant panel information.
<Dir end_to_end>
<Module test_orchestrator.py>
Integration tests for EndToEndOrchestrator.
Tests the complete workflow from prompt to final project creation,
including error recovery, checkpoint resume, and various scenarios.
<Class TestEndToEndOrchestrator>
Test cases for EndToEndOrchestrator class.
<Function test_orchestrator_initialization>
Test that orchestrator initializes correctly.
<Function test_orchestrator_with_default_config>
Test orchestrator with default configuration.
<Function test_get_progress_idle>
Test progress reporting when idle.
<Function test_get_workflow_status>
Test getting workflow status.
<Function test_get_project_path_no_project>
Test getting project path when no project is active.
<Function test_get_workflow_state_no_workflow>
Test getting workflow state when no workflow is active.
<Coroutine test_create_project_empty_prompt>
Test that empty prompt raises ValueError.
<Coroutine test_create_project_short_prompt>
Test that short prompt raises ValueError.
<Coroutine test_parsing_step>
Test the parsing step specifically.
<Coroutine test_name_generation_step>
Test the name generation step.
<Coroutine test_name_sanitization>
Test that invalid names are sanitized.
<Coroutine test_cancel_workflow>
Test workflow cancellation.
<Coroutine test_cancel_idle_workflow>
Test cancelling when not running.
<Function test_check_dependencies>
Test dependency checking.
<Function test_workflow_status_enum>
Test WorkflowStatus enum values.
<Coroutine test_resume_no_checkpoint>
Test resume with no existing checkpoint.
<Function test_add_step_start_hook>
Test adding step start hook.
<Function test_add_step_complete_hook>
Test adding step complete hook.
<Function test_add_workflow_complete_hook>
Test adding workflow complete hook.
<Function test_add_workflow_fail_hook>
Test adding workflow fail hook.
<Coroutine test_workflow_with_mock_components>
Test complete workflow with mocked components.
<Coroutine test_workflow_with_comfyui_unavailable>
Test workflow when ComfyUI is unavailable.
<Class TestCreateProjectFunction>
Test cases for the create_project convenience function.
<Coroutine test_create_project_function>
Test the create_project convenience function.
<Class TestOrchestratorEdgeCases>
Test edge cases and error conditions.
<Coroutine test_workflow_error_handling>
Test that workflow errors are handled correctly.
<Coroutine test_workflow_with_failing_components>
Test workflow when components fail.
<Function test_apply_options>
Test applying options to configuration.
<Function test_get_aspect_ratio_size>
Test aspect ratio size calculation.
<Class TestOrchestratorWithRealPrompts>
Test with real-world prompts from test files.
<Coroutine test_parse_blanche_neige_cyberpunk>
Test parsing 'Blanche-Neige Cyberpunk 2048' prompt.
<Coroutine test_parse_fairy_tale_mashup>
Test parsing mixed genre prompts.
<Coroutine test_parse_complex_prompt>
Test parsing a detailed prompt.
<Package integration>
<Dir roadmap>
<Module test_roadmap_generator.py>
Integration tests for RoadmapGenerator orchestrator.
These tests verify that the RoadmapGenerator correctly coordinates all components
to generate a complete roadmap from internal specs.
<Class TestRoadmapGeneratorIntegration>
Integration tests for the complete roadmap generation pipeline.
<Function test_generate_with_real_specs>
Test generating roadmap from actual project specs.
<Function test_generate_with_empty_specs>
Test generating roadmap when no specs exist.
<Function test_generate_with_sample_spec>
Test generating roadmap with a single sample spec.
<Function test_generate_with_completed_feature>
Test that completed features appear in changelog.
<Function test_generate_preserves_existing_files>
Test that regenerating doesn't lose data.
<Module test_audio_api.py>
Integration tests for Audio API endpoints.
Tests all 6 audio production endpoints:
- storycore.audio.voice.generate
- storycore.audio.music.generate
- storycore.audio.effects.add
- storycore.audio.mix
- storycore.audio.sync
- storycore.audio.analyze
<Class TestVoiceGenerate>
Test storycore.audio.voice.generate endpoint.
<Function test_voice_generate_success>
Test successful voice generation.
<Function test_voice_generate_missing_text>
Test voice generation with missing text parameter.
<Function test_voice_generate_text_too_long>
Test voice generation with text exceeding maximum length.
<Function test_voice_generate_minimal_params>
Test voice generation with minimal parameters.
<Class TestMusicGenerate>
Test storycore.audio.music.generate endpoint.
<Function test_music_generate_success>
Test successful music generation.
<Function test_music_generate_missing_required_params>
Test music generation with missing required parameters.
<Function test_music_generate_invalid_duration>
Test music generation with invalid duration.
<Function test_music_generate_minimal_params>
Test music generation with minimal parameters.
<Class TestEffectsAdd>
Test storycore.audio.effects.add endpoint.
<Function test_effects_add_success>
Test successful audio effect application.
<Function test_effects_add_file_not_found>
Test effect application with non-existent audio file.
<Function test_effects_add_invalid_effect_type>
Test effect application with invalid effect type.
<Function test_effects_add_all_effect_types>
Test all valid effect types.
<Class TestMix>
Test storycore.audio.mix endpoint.
<Function test_mix_success>
Test successful audio mixing.
<Function test_mix_no_tracks>
Test mixing with no tracks.
<Function test_mix_invalid_track_data>
Test mixing with invalid track data.
<Function test_mix_track_file_not_found>
Test mixing with non-existent track file.
<Class TestSync>
Test storycore.audio.sync endpoint.
<Function test_sync_success>
Test successful audio-video synchronization.
<Function test_sync_audio_not_found>
Test sync with non-existent audio file.
<Function test_sync_video_not_found>
Test sync with non-existent video file.
<Function test_sync_invalid_method>
Test sync with invalid sync method.
<Function test_sync_all_methods>
Test all valid sync methods.
<Class TestAnalyze>
Test storycore.audio.analyze endpoint.
<Function test_analyze_success>
Test successful audio analysis.
<Function test_analyze_file_not_found>
Test analysis with non-existent audio file.
<Function test_analyze_missing_audio_path>
Test analysis with missing audio_path parameter.
<Function test_analyze_recommendations_present>
Test that analysis provides recommendations.
<Function test_analyze_metrics_completeness>
Test that all expected metrics are present.
<Class TestEndToEndWorkflow>
Test end-to-end audio production workflows.
<Function test_voice_to_analysis_workflow>
Test workflow: generate voice -> analyze.
<Function test_music_to_effects_workflow>
Test workflow: generate music -> add effects.
<Function test_complete_production_workflow>
Test complete workflow: mix -> sync -> analyze.
<Module test_automation_api.py>
Tests d'intÚgration pour l'API Automation
VÚrifie les endpoints FastAPI de bout en bout
<Class TestDialogueEndpoints>
Tests pour les endpoints de dialogue
<Function test_generate_dialogue>
Test la gÚnÚration d'un dialogue
<Function test_get_dialogue_history>
Test la rÚcupÚration de l'historique
<Function test_get_dialogue_by_id>
Test la rÚcupÚration d'un dialogue spÚcifique
<Function test_clear_dialogue_history>
Test la suppression de l'historique
<Function test_generate_dialogue_invalid_archetype>
Test avec un archetype invalide
<Class TestCharacterGridEndpoints>
Tests pour les endpoints de grille de personnages
<Function test_generate_character_grid>
Test la gÚnÚration d'une grille
<Function test_get_character_grid>
Test la rÚcupÚration d'une grille
<Function test_get_character_grids>
Test la rÚcupÚration de toutes les grilles d'un personnage
<Function test_get_latest_grid>
Test la rÚcupÚration de la grille la plus rÚcente
<Function test_get_grid_layouts>
Test la rÚcupÚration des layouts disponibles
<Function test_get_grid_options>
Test la rÚcupÚration des options disponibles
<Function test_generate_grid_invalid_size>
Test avec une taille de grille invalide
<Class TestPromptEnhancementEndpoints>
Tests pour les endpoints d'amÚlioration de prompts
<Function test_enhance_prompt>
Test l'amÚlioration d'un prompt
<Function test_enhance_prompt_minimal>
Test avec un prompt minimal
<Function test_get_prompt_styles>
Test la rÚcupÚration des styles disponibles
<Function test_enhance_prompt_empty>
Test avec un prompt vide
<Class TestHealthEndpoint>
Tests pour l'endpoint de santÚ
<Function test_health_check>
Test la vÚrification de l'Útat
<Function test_health_components>
Test les composants de santÚ
<Class TestIntegrationScenarios>
ScÚnarios d'intÚgration de bout en bout
<Function test_full_dialogue_workflow>
ScÚnario complet: gÚnÚrer, lister, rÚcupÚrer, effacer
<Function test_full_grid_workflow>
ScÚnario complet: gÚnÚrer, rÚcupÚrer, lister
<Function test_prompt_enhancement_chain>
Cha¯ne d'amÚlioration de prompts
<Class TestErrorHandling>
Tests de gestion des erreurs
<Function test_nonexistent_dialogue>
RÚcupÚration d'un dialogue inexistant
<Function test_nonexistent_grid>
RÚcupÚration d'une grille inexistante
<Function test_nonexistent_character_grids>
RÚcupÚration des grilles d'un personnage inexistant
<Module test_caching.py>
Integration tests for API caching functionality.
Tests cache behavior for metadata endpoints and cache invalidation on mutations.
<Class TestCacheService>
Test the CacheService class.
<Function test_cache_set_and_get>
Test basic cache set and get operations.
<Function test_cache_miss>
Test cache miss returns None.
<Function test_cache_expiration>
Test that cache entries expire after TTL.
<Function test_cache_delete>
Test cache entry deletion.
<Function test_cache_invalidation_pattern>
Test pattern-based cache invalidation.
<Function test_cache_clear>
Test clearing all cache entries.
<Function test_cache_stats>
Test cache statistics tracking.
<Function test_generate_cache_key>
Test cache key generation.
<Function test_cleanup_expired>
Test cleanup of expired entries.
<Class TestCacheTTLConfiguration>
Test TTL configuration for different endpoint types.
<Function test_list_endpoint_ttl>
Test TTL for list endpoints.
<Function test_status_endpoint_ttl>
Test TTL for status endpoints.
<Function test_get_endpoint_ttl>
Test TTL for get endpoints.
<Function test_search_endpoint_ttl>
Test TTL for search endpoints.
<Function test_schema_endpoint_ttl>
Test TTL for schema endpoints.
<Function test_default_ttl>
Test default TTL for unmatched endpoints.
<Class TestCacheMiddleware>
Test cache middleware integration.
<Function test_cache_middleware_cacheable_endpoint>
Test that cacheable endpoints use cache.
<Function test_cache_middleware_non_cacheable_endpoint>
Test that non-cacheable endpoints bypass cache.
<Class TestCacheInvalidationMiddleware>
Test cache invalidation middleware.
<Function test_invalidation_on_create>
Test cache invalidation on create operations.
<Function test_invalidation_on_update>
Test cache invalidation on update operations.
<Function test_invalidation_on_delete>