diff --git a/test.py b/test.py index 46f87c0..c913e6e 100644 --- a/test.py +++ b/test.py @@ -10,6 +10,22 @@ class TestManaMath(unittest.TestCase): self.assertRaises(Exception, lambda: Mana('r') - Mana('rr')) self.assertRaises(Exception, lambda: Mana('r') - Mana('g')) +class TestManaCost(unittest.TestCase): + def test_uncolored(self): + self.assertEquals('3', str(ManaCost('3'))) + def test_colored(self): + self.assertEquals('RU', str(ManaCost('RU'))) + def test_combined(self): + self.assertEquals('3RR', str(ManaCost('3RR'))) + def test_mana(self): + self.assertEquals('BBW', str(ManaCost(Mana('BBW')))) + def test_hybrid_monocolor(self): + self.assertEquals('(1/U)', str(ManaCost('(1/U)'))) + def test_hybrid_multicolor(self): + self.assertEquals('(W/R)', str(ManaCost('(W/R)'))) + def test_snow(self): + self.assertEquals('S', str(ManaCost('S'))) + class TestManaCostMath(unittest.TestCase): def test_add_manacost(self): self.assertEquals('3R', str(ManaCost('2R') + ManaCost('1')))