From 234a77cdbc5fdf7ee85a10bdf1c56e8ba6e4c3f2 Mon Sep 17 00:00:00 2001 From: Correl Roush Date: Thu, 2 Sep 2010 09:47:09 -0400 Subject: [PATCH] New mana cost tests, including unsupported snow and hybrid costs --- test.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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')))