From d29764d2bce83822b83e4d8581d7eceb25b43f63 Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Tue, 3 Jan 2023 21:59:42 -0600 Subject: [PATCH] Apply Blue style to tests file --- test/runtests.jl | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index 7e0b28a..5f163b0 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -29,7 +29,7 @@ using BioSequences using SequenceVariation using Test -const DNA_MODEL = BioAlignments.AffineGapScoreModel(EDNAFULL, gap_open=-25, gap_extend=-2) +const DNA_MODEL = BioAlignments.AffineGapScoreModel(EDNAFULL; gap_open=-25, gap_extend=-2) align(a::BioSequence, b::BioSequence) = pairalign(GlobalAlignment(), a, b, DNA_MODEL).aln seq1 = ungap!(dna"--ATGCGTGTTAGCAAC--TTATCGCG") @@ -112,23 +112,33 @@ end refseq = dna"GATTACA" mutseq = dna"GATTACAAAA" - refvar = Variant(refseq, SequenceVariation.Edit{typeof(refseq), eltype(refseq)}[]) + refvar = Variant(refseq, SequenceVariation.Edit{typeof(refseq),eltype(refseq)}[]) # Test for ending soft clip - @test Variant(PairwiseAlignment(AlignedSequence(mutseq, Alignment("7=3S", 1, 1)), refseq)) == refvar + @test Variant( + PairwiseAlignment(AlignedSequence(mutseq, Alignment("7=3S", 1, 1)), refseq) + ) == refvar # Test for ending soft+hard clip - @test Variant(PairwiseAlignment(AlignedSequence(mutseq, Alignment("7=3S2H", 1, 1)), refseq)) == refvar + @test Variant( + PairwiseAlignment(AlignedSequence(mutseq, Alignment("7=3S2H", 1, 1)), refseq) + ) == refvar # Test that ending insertions are still valid - @test length(Variant(PairwiseAlignment(AlignedSequence(mutseq, Alignment("7=3I", 1, 1)), refseq)).edits) == 1 + @test length( + Variant( + PairwiseAlignment(AlignedSequence(mutseq, Alignment("7=3I", 1, 1)), refseq) + ).edits, + ) == 1 # Test that out-of-bounds bases are still caught - @test_throws BoundsError Variant(PairwiseAlignment(AlignedSequence(mutseq, Alignment("7=3X", 1, 1)), refseq)) + @test_throws BoundsError Variant( + PairwiseAlignment(AlignedSequence(mutseq, Alignment("7=3X", 1, 1)), refseq) + ) end @testset "Aqua" begin - Aqua.test_ambiguities(SequenceVariation;recursive=false) + Aqua.test_ambiguities(SequenceVariation; recursive=false) # TODO: Refactor `Edit` so that this test doesn't fail # TODO: This test _should_ be set to @test_fails, but Aqua's syntax doesn't allow that # Aqua.test_unbound_args(SequenceVariation)