Ejemplo n.º 1
0
def test_py3_safe_does_nothing_if_only_one_number_example():
    assert _py3_safe(['a', 5], False, isint) == ['a', 5]
Ejemplo n.º 2
0
def test_py3_safe_inserts_empty_string_between_two_numbers_example():
    assert _py3_safe([5, 9], False, isint) == [5, '', 9]
Ejemplo n.º 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), '')
Ejemplo n.º 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']
Ejemplo n.º 5
0
def test_py3_safe_inserts_empty_string_between_two_numbers_example():
    assert _py3_safe([5, 9], False, isint) == [5, '', 9]
Ejemplo n.º 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]
Ejemplo n.º 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']
Ejemplo n.º 8
0
def test_py3_safe_does_nothing_if_only_one_number():
    assert _py3_safe(['a', 5], False) == ['a', 5]
Ejemplo n.º 9
0
def test_py3_safe_does_nothing_if_only_one_number():
    assert _py3_safe(['a', 5], False) == ['a', 5]
Ejemplo n.º 10
0
def test_py3_safe_inserts_empty_string_between_two_numbers():
    assert _py3_safe([5, 9], False) == [5, '', 9]
Ejemplo n.º 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']
Ejemplo n.º 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]
Ejemplo n.º 13
0
def test_py3_safe_inserts_empty_string_between_two_numbers():
    assert _py3_safe([5, 9], False) == [5, '', 9]
Ejemplo n.º 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]
Ejemplo n.º 15
0
def test_py3_safe_does_nothing_if_only_one_number_example():
    assert _py3_safe(['a', 5], False, isint) == ['a', 5]
Ejemplo n.º 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), '')
Ejemplo n.º 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']