コード例 #1
0
ファイル: test_mathhammer.py プロジェクト: hoylemd/Warhelper
def test_boltgun():
    boltgun = Weapon("Boltgun", 24, 4, 5, ["rapid fire"])
    expected  = "        Range S  AP Type\n"
    expected += "Boltgun  24\"  4  5  rapid fire"

    output = boltgun.print_statline()

    result = output == expected

    if not result:
        print "expected:"
        print expected
        print output
        print "^- output"

    assert result
コード例 #2
0
ファイル: test_mathhammer.py プロジェクト: hoylemd/Warhelper
def test_plasmagun():
    weapon = Weapon("Plasmagun", 24, 7, 2, ["rapid fire", "gets hot"])
    expected  = "          Range S  AP Type\n"
    expected += "Plasmagun  24\"  7  2  rapid fire,\n"
    expected += "                      gets hot"

    output = weapon.print_statline()

    result = output == expected

    if not result:
        print "expected:"
        print expected
        print output
        print "^- output"

    assert result