示例#1
0
def test_starry_night_05():
    # random
    for _ in range(100):
        rows = random.randint(0, 1000)
        assert exam.starry_night(rows) == "\n".join(
            "*" * x for x in range(1, rows + 1))
示例#2
0
def test_starry_night_04():
    # test 6
    assert exam.starry_night(6) == "*\n**\n***\n****\n*****\n******"
示例#3
0
def test_starry_night_02():
    # test 2
    assert exam.starry_night(2) == "*\n**"
示例#4
0
def test_starry_night_03():
    # test 0
    assert exam.starry_night(0) == ""
示例#5
0
def test_starry_night_01():
    # test 1
    assert exam.starry_night(1) == "*"