portfoliome /
foil
| 1 | import unittest |
||
|
0 ignored issues
–
show
|
|||
| 2 | |||
| 3 | from foil.util import natural_sort |
||
| 4 | |||
| 5 | |||
| 6 | class TestNaturalSort(unittest.TestCase): |
||
| 7 | def test_natural_sort(self): |
||
| 8 | entries = ['ab127b', 'ab123b'] |
||
| 9 | |||
| 10 | expected = ['ab123b', 'ab127b'] |
||
| 11 | result = natural_sort(entries) |
||
| 12 | |||
| 13 | self.assertEqual(expected, result) |
||
| 14 |
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.