New mana cost tests, including unsupported snow and hybrid costs
This commit is contained in:
parent
cd179365e7
commit
234a77cdbc
1 changed files with 16 additions and 0 deletions
16
test.py
16
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')))
|
||||
|
|
Loading…
Reference in a new issue