diff options
author | Seth M Morton <seth.m.morton@gmail.com> | 2018-09-02 23:00:52 -0700 |
---|---|---|
committer | Seth M Morton <seth.m.morton@gmail.com> | 2018-09-02 23:00:52 -0700 |
commit | 6218b723075987f328d0ec50a337571ca96faf1a (patch) | |
tree | 7b43903c0c4b2ffea0bfa698c3d63c5eb6bf7acf | |
parent | b63a08d11915fb9e627bf14ca5b8efad08f5d3d5 (diff) | |
download | natsort-6218b723075987f328d0ec50a337571ca96faf1a.tar.gz |
Ensure all tests using LOCALE have a locale set.
-rw-r--r-- | test_natsort/test_natsorted_convenience.py | 2 | ||||
-rw-r--r-- | test_natsort/test_string_component_transform_factory.py | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/test_natsort/test_natsorted_convenience.py b/test_natsort/test_natsorted_convenience.py index 0813727..e412152 100644 --- a/test_natsort/test_natsorted_convenience.py +++ b/test_natsort/test_natsorted_convenience.py @@ -75,6 +75,7 @@ def test_realsorted_is_identical_to_natsorted_with_real_alg(float_list): assert realsorted(float_list) == natsorted(float_list, alg=ns.REAL) +@pytest.mark.usefixtures("with_locale_en_us") def test_humansorted_is_identical_to_natsorted_with_locale_alg(fruit_list): assert humansorted(fruit_list) == natsorted(fruit_list, alg=ns.LOCALE) @@ -108,6 +109,7 @@ def test_index_realsorted_is_identical_to_index_natsorted_with_real_alg(float_li assert index_realsorted(float_list) == index_natsorted(float_list, alg=ns.REAL) +@pytest.mark.usefixtures("with_locale_en_us") def test_index_humansorted_is_identical_to_index_natsorted_with_locale_alg(fruit_list): assert index_humansorted(fruit_list) == index_natsorted(fruit_list, alg=ns.LOCALE) diff --git a/test_natsort/test_string_component_transform_factory.py b/test_natsort/test_string_component_transform_factory.py index 73371c4..87f6bde 100644 --- a/test_natsort/test_string_component_transform_factory.py +++ b/test_natsort/test_string_component_transform_factory.py @@ -66,6 +66,7 @@ def no_null(x): | floats() | text().filter(bool).filter(no_bad_uni_chars).filter(no_null) ) +@pytest.mark.usefixtures("with_locale_en_us") def test_string_component_transform_factory(x, alg, example_func): string_component_transform_func = string_component_transform_factory(alg) try: |