Mercurial > sypikslang
comparison gamelib/tests/test_lab.py @ 14:9d61abb3cfaf
Better subclass handling.
author | Jeremy Thurgood <firxen@gmail.com> |
---|---|
date | Sun, 06 May 2012 15:58:03 +0200 |
parents | 967480d228b6 |
children | 10d3db1f1e08 |
comparison
equal
deleted
inserted
replaced
13:c0966997e0c5 | 14:9d61abb3cfaf |
---|---|
1 from unittest import TestCase | 1 from unittest import TestCase |
2 | 2 |
3 from gamelib.lab import Lab | 3 from gamelib.lab import Lab |
4 from gamelib import research, products | |
4 | 5 |
5 | 6 |
6 class TestLab(TestCase): | 7 class TestLab(TestCase): |
8 def setUp(self): | |
9 self.lab = Lab() | |
10 | |
7 def test_find_new_products(self): | 11 def test_find_new_products(self): |
8 lab = Lab() | 12 new_products = self.lab.find_new_products(None) |
9 print lab.find_new_products(None) | 13 self.assertTrue(products.MachineGun in new_products) |
14 self.assertTrue(products.DoomsdayVirus not in new_products) | |
10 | 15 |
11 def test_find_new_research(self): | 16 def test_find_new_research(self): |
12 lab = Lab() | 17 new_research = self.lab.find_new_research(None) |
13 print lab.find_new_research(None) | 18 self.assertTrue(research.Tesla in new_research) |
19 self.assertTrue(research.Space not in new_research) |