def test_add_duplicate_chrom_with_replace(smpl_fasta): if 'added' not in smpl_fasta: chrom = lp.Chromosome('added', 'U' * 100) smpl_fasta.add_chrom(chrom) chrom = lp.Chromosome('added', 'U' * 200) smpl_fasta.add_chrom(chrom, replace=True) assert len(smpl_fasta['added']) == 200 smpl_fasta.del_chrom('added')
def test_remove_Chromosome(smpl_fasta): if 'added' not in smpl_fasta: chrom = lp.Chromosome('added', 'U' * 100) smpl_fasta.add_chrom(chrom) chrom = smpl_fasta['added'] smpl_fasta.del_chrom(chrom) assert 'added' not in smpl_fasta
def test_add_duplicate_chrom(smpl_fasta): chrom = lp.Chromosome('added', 'U' * 100) if 'added' not in smpl_fasta: smpl_fasta.add_chrom(chrom) with pytest.raises(ValueError): smpl_fasta.add_chrom(chrom) smpl_fasta.del_chrom('added')
def test_add_chrom(smpl_fasta): chrom = lp.Chromosome('added', 'U' * 100) smpl_fasta.add_chrom(chrom) assert len(smpl_fasta['added']) == 100 smpl_fasta.del_chrom('added')