示例#1
0
def test_random(times):
    """."""
    _nums = random.sample(
        range(10),
        random.randint(1, 9)
    )
    _nums = ''.join(map(str, _nums))
    _input = ''.join(
        random.choice(string.ascii_letters + string.digits) for _ in range(
            random.randint(0, 100)
        )
    ) + _nums
    _output = increment_string(_input)
    _real = real(_input)
    assert _output == _real
示例#2
0
def test_case_12():
    """test_case_12."""
    assert increment_string("009") == "010"
示例#3
0
def test_case_0():
    """test_case_0."""
    assert increment_string("foo") == "foo1"
示例#4
0
def test_case_10():
    """test_case_10."""
    assert increment_string("foobar1") == "foobar2"
示例#5
0
def test_case_11():
    """test_case_11."""
    assert increment_string("1") == "2"
示例#6
0
def test_case_9():
    """test_case_9."""
    assert increment_string("foobar001") == "foobar002"
示例#7
0
def test_case_8():
    """test_case_8."""
    assert increment_string("foobar00999") == "foobar01000"
示例#8
0
def test_case_7():
    """test_case_7."""
    assert increment_string("foobar999") == "foobar1000"
示例#9
0
def test_case_6():
    """test_case_6."""
    assert increment_string("foobar000") == "foobar001"
示例#10
0
def test_case_5():
    """test_case_5."""
    assert increment_string("") == "1"