# -*- coding: utf-8 -*-
# Copyright (C) Joshua Smith (2016-)
#
# This file is part of the GW DetChar python package.
#
# gwdetchar is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# gwdetchar is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with gwdetchar.  If not, see <http://www.gnu.org/licenses/>.

"""Tests for :mod:`gwdetchar.utils`
"""

import pytest

from .. import utils


@pytest.mark.parametrize('in_, out', [
    ([1, 2, 3], [1, 2, 3]),
    ([1, 10, 2, 3], [1, 2, 3, 10]),
    (['1', '10', '2', '3'], ['1', '2', '3', '10']),
    (['a', 'b', 'd', 'c'], ['a', 'b', 'c', 'd']),
])
def test_natural_sort(in_, out):
    assert utils.natural_sort(in_) == out
