runscripts.test_workflow

Tests for Nextflow workflow generation in workflow.py

These tests verify the correctness of: - Channel grouping templates (MULTIDAUGHTER_CHANNEL, MULTIGENERATION_CHANNEL, etc.) - Analysis batching logic with group_size for cache invalidation - Full workflow generation via –build-only - Nextflow stub execution to validate generated workflow files

Note: The mock createVariants stub always creates 3 variants:
  • variant_1, variant_2, baseline

This is used to verify exact group_size calculations in stub tests.

class runscripts.test_workflow.TestGenerateCode[source]

Bases: object

Test the generate_code function.

class runscripts.test_workflow.TestGenerateLineage[source]

Bases: object

Test the generate_lineage function output.

class runscripts.test_workflow.TestGroupSizeValues[source]

Bases: object

Test that group_size values are calculated correctly for different configurations.

class runscripts.test_workflow.TestNextflowStubExecution[source]

Bases: object

Integration tests that generate workflow files and run Nextflow in stub mode.

These tests require Nextflow to be installed and available on PATH.

pytestmark = [Mark(name='skipif', args=(True,), kwargs={'reason': 'Nextflow not available on PATH'}), Mark(name='slow', args=(), kwargs={})]
runscripts.test_workflow._check_nextflow_available()[source]

Check if Nextflow is available on PATH.

runscripts.test_workflow.temp_config_dir(tmp_path)[source]

Create a temporary directory for test configs.