コード例 #1
0
ファイル: bottles_test.py プロジェクト: hdantas/99bottles
def test_verse_0():

    expected = ("No more bottles of beer on the wall, " +
                "no more bottles of beer.\n" +
                "Go to the store and buy some more, " +
                "99 bottles of beer on the wall.\n")
    assert_that(expected).is_equal_to(Bottles.verse(0))
コード例 #2
0
ファイル: bottles_test.py プロジェクト: hdantas/99bottles
def test_the_first_verse():
    expected = ("99 bottles of beer on the wall, " + "99 bottles of beer.\n" +
                "Take one down and pass it around, " +
                "98 bottles of beer on the wall.\n")
    assert_that(expected).is_equal_to(Bottles.verse(99))
コード例 #3
0
ファイル: bottles_test.py プロジェクト: hdantas/99bottles
def test_verse_2():
    expected = ("2 bottles of beer on the wall, " + "2 bottles of beer.\n" +
                "Take one down and pass it around, " +
                "1 bottle of beer on the wall.\n")
    assert_that(expected).is_equal_to(Bottles.verse(2))
コード例 #4
0
ファイル: bottles_test.py プロジェクト: hdantas/99bottles
def test_verse_1():
    expected = ("1 bottle of beer on the wall, " + "1 bottle of beer.\n" +
                "Take it down and pass it around, " +
                "no more bottles of beer on the wall.\n")
    assert_that(expected).is_equal_to(Bottles.verse(1))
コード例 #5
0
ファイル: bottles_test.py プロジェクト: hdantas/99bottles
def test_another_verse():

    expected = ("3 bottles of beer on the wall, " + "3 bottles of beer.\n" +
                "Take one down and pass it around, " +
                "2 bottles of beer on the wall.\n")
    assert_that(expected).is_equal_to(Bottles.verse(3))