Exemplo n.º 1
0
 def test_get_classification_empty(self):
     """
     Test that NoClassificationError is raised when there is no or an empty
     classification map set.
     """
     e = MemoryClassificationElement('test', 0)
     e._c = None
     with pytest.raises(NoClassificationError,
                        match="No classification labels/values"):
         e.get_classification()
Exemplo n.º 2
0
 def test_get_classification(self):
     """
     Test that a valid classification map is returned from
     """
     expected_map = {'a': 1, 'b': 0}
     e = MemoryClassificationElement('test', 0)
     e._c = expected_map
     assert e.get_classification() == expected_map