From 1cf15edbcc3833cd2ec0938d5c6591d7a2e219b7 Mon Sep 17 00:00:00 2001 From: Alexanderlacuna Date: Tue, 27 Oct 2020 14:07:49 +0300 Subject: address failures --- wqflask/tests/wqflask/show_trait/test_export_trait_data.py | 12 +++++++----- 1 file 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) -- cgit v1.2.3