예제 #1
0
def test_natsort_key_with_key_argument_applies_key_before_processing(x):
    assert natsort_key(x, len, str_func, fail, lambda y: y) == len(x)
예제 #2
0
def test_natsort_key_with_nested_input_takes_nested_path(x):
    assert natsort_key(x, None, str_func, fail, fail) == tuple(x)
예제 #3
0
def test_natsort_key_with_bytes_input_takes_bytes_path(x):
    assert natsort_key(x, None, str_func, lambda y: y, fail) is x
예제 #4
0
def test_natsort_key_with_text_input_takes_string_path(x):
    assert natsort_key(x, None, str_func, fail, fail) is x
예제 #5
0
def test_natsort_key_with_numeric_input_takes_number_path(x):
    assert natsort_key(x, None, str_func, fail, lambda y: y) is x