Require a market to use buying and selling
This commit is contained in:
@@ -354,6 +354,18 @@ class TestWorld(unittest.TestCase):
|
||||
self.assertResourcesMatch([500, 400, 450 + gathered, 500], game.world)
|
||||
|
||||
|
||||
def test_market_buy_without_market(self):
|
||||
game = Gameplay()
|
||||
|
||||
game.world.age = Ages.FEUDAL
|
||||
game.world.gather.resources = [500, 500, 1000, 500]
|
||||
|
||||
game.market_buy(0, Resources.FOOD, 100)
|
||||
|
||||
with self.assertRaises(MissingDependencyException):
|
||||
game.play_until(1)
|
||||
|
||||
|
||||
def test_market_buy(self):
|
||||
game = Gameplay()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user