def test_sm_missing_exp_empty_ok(self) -> None: genes = check_variant_links( small_mutations=[IprGeneVariant({'gene': 'KRAS'})], copy_variants=[IprGeneVariant({ 'gene': 'KRAS', 'variant': '' })], expression_variants=[], structural_variants=[], ) assert genes == {'KRAS'}
def test_sm_missing_copy(self) -> None: with mock.patch.object(logger, 'verbose') as mock_debug: check_variant_links( small_mutations=[IprGeneVariant({'gene': 'KRAS'})], copy_variants=[IprGeneVariant({ 'gene': 'CDK', 'variant': '' })], expression_variants=[ IprGeneVariant({ 'gene': 'KRAS', 'variant': '' }) ], structural_variants=[], ) assert mock_debug.called
def test_with_valid_inputs(self) -> None: genes = check_variant_links( small_mutations=[IprGeneVariant({'gene': 'KRAS'})], copy_variants=[ IprGeneVariant({ 'gene': 'KRAS', 'variant': '' }), IprGeneVariant({ 'gene': 'CDK', 'variant': '' }), ], expression_variants=[ IprGeneVariant({ 'gene': 'KRAS', 'variant': '' }) ], structural_variants=[], ) assert genes == {'KRAS'}