예제 #1
0
 def test_repr(self):
     obj = rna_qc.QCMetric('a', {1: 'x'})
     self.assertEqual(obj.__repr__(),
                      "QCMetric('a', OrderedDict([(1, 'x')]))")
예제 #2
0
 def setUp(self):
     self.obj_a1 = rna_qc.QCMetric('a', {1: 2})
     self.obj_a2 = rna_qc.QCMetric('a', {2: 3})
     self.obj_b = rna_qc.QCMetric('b', {3: 4})
     self.qc_record = rna_qc.QCMetricRecord()
예제 #3
0
 def test_less_than(self):
     smaller_obj = rna_qc.QCMetric(1, {})
     bigger_obj = rna_qc.QCMetric(2, {})
     self.assertTrue(smaller_obj < bigger_obj)
예제 #4
0
 def test_equals(self):
     first_obj = rna_qc.QCMetric('a', {})
     second_obj = rna_qc.QCMetric('a', {'x': 'y'})
     self.assertTrue(first_obj == second_obj)
예제 #5
0
 def test_get_content(self):
     qc_obj = rna_qc.QCMetric('_', {2: 'a', 1: 'b'})
     self.assertEqual(qc_obj.content, OrderedDict([(1, 'b'), (2, 'a')]))
예제 #6
0
 def test_get_name(self):
     qc_obj = rna_qc.QCMetric('a', {})
     self.assertEqual(qc_obj.name, 'a')
예제 #7
0
 def test_type_check(self):
     with self.assertRaises(TypeError):
         rna_qc.QCMetric('name', 1)
예제 #8
0
 def test_equals(self):
     first_obj = rna_qc.QCMetric("a", {})
     second_obj = rna_qc.QCMetric("a", {"x": "y"})
     self.assertTrue(first_obj == second_obj)
예제 #9
0
 def test_get_content(self):
     qc_obj = rna_qc.QCMetric("_", {2: "a", 1: "b"})
     self.assertEqual(qc_obj.content, OrderedDict([(1, "b"), (2, "a")]))