Skip to content

Commit

Permalink
TST: Update tests and test images
Browse files Browse the repository at this point in the history
  • Loading branch information
robertopreste committed Mar 4, 2020
1 parent e8244e6 commit b13dcc9
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 2 deletions.
Binary file modified mitoviz/tests/images/multisample_linear_split_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified mitoviz/tests/images/multisample_linear_split_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified mitoviz/tests/images/multisample_linear_split_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified mitoviz/tests/images/multisample_linear_split_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified mitoviz/tests/images/multisample_linear_split_5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified mitoviz/tests/images/sample_linear_hf_split.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified mitoviz/tests/images/sample_linear_split.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 23 additions & 2 deletions mitoviz/tests/test_variant.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ def test__is_insertion_true(self):
self.assertTrue(self.variant_ins._is_insertion)
self.assertTrue(self.variant_ins_raw._is_insertion)

def test_color(self):
self.assertEqual("#2e8b57", self.variant.color)

def test_label(self):
self.assertEqual("3308C>A", self.variant.label)
self.assertEqual("3308C>A", self.variant_raw.label)
Expand All @@ -88,5 +91,23 @@ def test_linear_x(self):
def test_linear_y(self):
self.assertEqual(0.3, self.variant.linear_y)

def test_color(self):
self.assertEqual("#2e8b57", self.variant.color)
def test_strand(self):
# Given/When
variant_h = self.variant
variant_l = _Variant(
reference="C",
position=500,
alternate=Substitution("SNV", "A"),
hf=0.3
)
variant_nc = _Variant(
reference="C",
position=3305,
alternate=Substitution("SNV", "A"),
hf=0.3
)

# Then
self.assertEqual("H", variant_h.strand)
self.assertEqual("L", variant_l.strand)
self.assertEqual("", variant_nc.strand)

0 comments on commit b13dcc9

Please sign in to comment.