| Total Complexity | 2 |
| Total Lines | 13 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | import unittest |
||
| 6 | class TestSnakeCamel(unittest.TestCase): |
||
| 7 | |||
| 8 | def test_camel_to_snake_case(self): |
||
| 9 | expected = 'hello_world' |
||
| 10 | result = camel_to_snake('helloWorld') |
||
| 11 | |||
| 12 | self.assertEqual(expected, result) |
||
| 13 | |||
| 14 | def test_snake_to_camel_case(self): |
||
| 15 | expected = '123HelloWorld' |
||
| 16 | result = snake_to_camel('123_hello_world') |
||
| 17 | |||
| 18 | self.assertEqual(expected, result) |
||
| 19 |
The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:
If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.