示例#1
0
def test_py3_safe_does_nothing_if_only_one_number_example():
    assert _py3_safe(['a', 5], False, isint) == ['a', 5]
示例#2
0
def test_py3_safe_inserts_empty_string_between_two_numbers_example():
    assert _py3_safe([5, 9], False, isint) == [5, '', 9]
示例#3
0
def test_py3_safe_inserts_empty_string_between_two_numbers(x):
    assume(bool(x))
    assert _py3_safe(x, False, isint) == sep_inserter(x, (int, long), '')
示例#4
0
def test_py3_safe_does_nothing_if_no_numbers_example():
    assert _py3_safe(['a', 'b', 'c'], False, isint) == ['a', 'b', 'c']
    assert _py3_safe(['a'], False, isint) == ['a']
示例#5
0
def test_py3_safe_inserts_empty_string_between_two_numbers_example():
    assert _py3_safe([5, 9], False, isint) == [5, '', 9]
示例#6
0
def test_py3_safe_with_use_locale_inserts_null_string_between_two_numbers_example(
):
    assert _py3_safe([5, 9], True, isint) == [5, null_string, 9]
示例#7
0
def test_py3_safe_does_nothing_if_no_numbers_example():
    assert _py3_safe(['a', 'b', 'c'], False, isint) == ['a', 'b', 'c']
    assert _py3_safe(['a'], False, isint) == ['a']
示例#8
0
def test_py3_safe_does_nothing_if_only_one_number():
    assert _py3_safe(['a', 5], False) == ['a', 5]
示例#9
0
def test_py3_safe_does_nothing_if_only_one_number():
    assert _py3_safe(['a', 5], False) == ['a', 5]
示例#10
0
def test_py3_safe_inserts_empty_string_between_two_numbers():
    assert _py3_safe([5, 9], False) == [5, '', 9]
示例#11
0
def test_py3_safe_does_nothing_if_no_numbers():
    assert _py3_safe(['a', 'b', 'c'], False) == ['a', 'b', 'c']
    assert _py3_safe(['a'], False) == ['a']
示例#12
0
def test_py3_safe():

    assert _py3_safe(['a', 'b', 'c']) == ['a', 'b', 'c']
    assert _py3_safe(['a']) == ['a']
    assert _py3_safe(['a', 5]) == ['a', 5]
    assert _py3_safe([5, 9]) == [5, '', 9]
示例#13
0
def test_py3_safe_inserts_empty_string_between_two_numbers():
    assert _py3_safe([5, 9], False) == [5, '', 9]
示例#14
0
def test_py3_safe_with_use_locale_inserts_null_string_between_two_numbers_example():
    assert _py3_safe([5, 9], True, isint) == [5, null_string, 9]
示例#15
0
def test_py3_safe_does_nothing_if_only_one_number_example():
    assert _py3_safe(['a', 5], False, isint) == ['a', 5]
示例#16
0
def test_py3_safe_inserts_empty_string_between_two_numbers(x):
    assume(bool(x))
    assert _py3_safe(x, False, isint) == sep_inserter(x, (int, long), '')
示例#17
0
def test_py3_safe_does_nothing_if_no_numbers():
    assert _py3_safe(['a', 'b', 'c'], False) == ['a', 'b', 'c']
    assert _py3_safe(['a'], False) == ['a']