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
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