diff --git a/coverage.xml b/coverage.xml index 8e4bf1c..3de357b 100644 --- a/coverage.xml +++ b/coverage.xml @@ -1,5 +1,5 @@ - + @@ -606,6 +606,11 @@ + + + + + @@ -2449,7 +2454,7 @@ - + @@ -2670,7 +2675,7 @@ - + @@ -2694,9 +2699,9 @@ - - - + + + diff --git a/tests/test_format.py b/tests/test_format.py index e928397..61897a0 100644 --- a/tests/test_format.py +++ b/tests/test_format.py @@ -22,3 +22,19 @@ class TextToXMLTestCase(unittest.TestCase): def test_specials_chars(self): for inp, out in self.specials.items(): self.assertEqual(escape_xml(inp), out) + + +class CodeClimateSeverityTestCase(unittest.TestCase): + + expected = { + None: "info", + 'warning': "minor", + 'error': "major", + 0: "info", + 1: "minor", + 2: "major", + } + + def test_specials_chars(self): + for inp, out in self.expected.items(): + self.assertEqual(severity_from_level(inp), out)