seismicrna.sim.tests package

Submodules

class seismicrna.sim.tests.cli_test.TestSimCLIInvocation(methodName='runTest')

Bases: TestCase

Smoke-test each subcommand via CliRunner.

Two tiers: - –help: validates Click’s param parsing and help-text generation

for every command (including fold, which needs a positional arg).

  • empty invocation ([]): calls run() through the full decorator stack with no files; commands return empty results with exit_code 0. fold is excluded because its positional arg is required and Click itself rejects an empty invocation with exit_code 2.

setUp()

Hook method for setting up the test fixture before exercising it.

tearDown()

Hook method for deconstructing the test fixture after testing it.

test_abstract_empty()
test_abstract_help()
test_clusts_empty()
test_clusts_help()
test_ends_empty()
test_ends_help()
test_fastq_empty()
test_fastq_help()
test_fold_help()
test_muts_empty()
test_muts_help()
test_params_empty()
test_params_help()
test_ref_empty()
test_ref_help()
test_relate_empty()
test_relate_help()
test_total_empty()
test_total_help()
class seismicrna.sim.tests.cli_test.TestSimCLIParams(methodName='runTest')

Bases: TestCase

Check every CLI param name appears in run()’s signature.

inspect.signature() follows the __wrapped__ chain (all decorators in run_func use @wraps) and stops at the __signature__ set by param_defaults, which preserves the original parameter names.

test_abstract()
test_clusts()
test_ends()
test_fastq()
test_fold()
test_muts()
test_params()
test_ref()
test_relate()
test_total()
class seismicrna.sim.tests.ends_test.TestSimPEnds(methodName='runTest')

Bases: TestCase

equate(end5: int, end3: int, center_fmean: float, center_fvar: float, length_fmean: float, length_fvar: float, end5s: ndarray, end3s: ndarray, pends: ndarray, **kwargs)
test_center_fvar_0_length_fvar_0()
test_zero_length_1_to_0_keep()
test_zero_length_9_to_8_drop()
test_zero_length_9_to_8_keep()
class seismicrna.sim.tests.relate_test.TestParseMinMutGapWeights(methodName='runTest')

Bases: TestCase

test_duplicate_gap()
test_empty_string()
test_gap_float_string()
test_gap_not_integer()
test_multiple_pairs()
test_multiple_zero_weights_excluded()
test_negative_gap()
test_negative_weight()
test_output_sorted_by_gap()
test_pair_extra_colon()
test_pair_missing_colon()
test_single_pair_gap0()
test_single_pair_nonzero_gap()
test_single_pair_weight_zero_invalid()
test_weight_above_1()
test_weight_not_float()
test_weights_do_not_sum_to_1()
test_weights_exceed_1_in_total()
test_weights_sum_to_1_within_float_tolerance()
test_zero_weight_excluded()
class seismicrna.sim.tests.relate_test.TestSimulateBatches(methodName='runTest')

Bases: TestCase

AMB = 129
NUM_READS = 10000000
PCLUST = [0.2, 0.5, 0.3]
P_GAP = {0: 0.2, 5: 0.3, 15: 0.5}
TOLERANCE = 0.005
test_drop_read_counts_without_gap_weights()

Single-gap DROP path must yield ~num_reads final reads.

test_read_counts_with_gap_weights()