aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorAlexanderlacuna2020-10-27 14:07:49 +0300
committerAlexanderlacuna2020-10-27 14:07:49 +0300
commit1cf15edbcc3833cd2ec0938d5c6591d7a2e219b7 (patch)
tree7b65fc0be1fba707c74bc37d451727481fea101a /wqflask
parentcf4a7154bd7243aa1cf25e04d03d89cb8b43c7c5 (diff)
downloadgenenetwork2-1cf15edbcc3833cd2ec0938d5c6591d7a2e219b7.tar.gz
address failures
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/tests/wqflask/show_trait/test_export_trait_data.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/wqflask/tests/wqflask/show_trait/test_export_trait_data.py b/wqflask/tests/wqflask/show_trait/test_export_trait_data.py
index 2f95d219..bc45a213 100644
--- a/wqflask/tests/wqflask/show_trait/test_export_trait_data.py
+++ b/wqflask/tests/wqflask/show_trait/test_export_trait_data.py
@@ -4,9 +4,10 @@ from wqflask.show_trait.export_trait_data import cmp_samples
class TestExportTraits(unittest.TestCase):
- """Test methods related converting dict to sortedlist"""
+ """Test methods related to converting dict to sortedlist"""
+
def test_dict_to_sortedlist(self):
- '''Test for conversion of dict to sorted list'''
+ '''test for conversion of dict to sorted list'''
sample1 = {
"other": "exp1",
"name": "exp2"
@@ -36,8 +37,7 @@ class TestExportTraits(unittest.TestCase):
self.assertFalse(["other", "name"] == dict_to_sorted_list(sample1))
def test_cmp_samples(self):
- '''test for function that does comparisons of samples'''
-
+ '''test for comparing samples function'''
sampleA = [
[
("value", "other"),
@@ -83,10 +83,12 @@ class TestExportTraits(unittest.TestCase):
"other_a", "val_a"),
("other_b", "val"
)
- ]]
+ ]
+ ]
results = [cmp_samples(val[0], val[1]) for val in sampleA]
resultB = [cmp_samples(val[0], val[1]) for val in sampleB]
resultC = [cmp_samples(val[0], val[1]) for val in sampleC]
+
self.assertEqual(1, *results)
self.assertEqual(-1, *resultB)
self.assertEqual([1, -1, 1, -1, -1, 1, -1, -1], resultC)