Completed
Push — master ( e0da72...49d54f )
by Philip
25s
created

TestNaturalSort   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 8
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A test_natural_sort() 0 7 1
1
import unittest
0 ignored issues
show
Coding Style introduced by
This module should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
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