~widelands-dev/widelands-website/trunk

« back to all changes in this revision

Viewing changes to widelandslib/test/test_tribe.py

  • Committer: Holger Rapp
  • Date: 2009-03-15 20:19:52 UTC
  • mto: This revision was merged to the branch mainline in revision 64.
  • Revision ID: sirver@kallisto.local-20090315201952-eaug9ff2ec8qx1au
Fixed a bug with broken notification support

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/env python -tt
2
 
# encoding: utf-8
3
 
#
4
 
 
5
 
import sys
6
 
sys.path.append("..")
7
 
 
8
 
from nose.tools import *
9
 
 
10
 
from tribe import Tribe
11
 
 
12
 
 
13
 
class TestTribe(object):
14
 
    def setUp(self):
15
 
        self.b = Tribe("barbarians")
16
 
        self.e = Tribe("empire")
17
 
        self.a = Tribe("atlanteans")
18
 
 
19
 
    def test_produces(self):
20
 
        assert_equal([
21
 
            "axe", "battleaxe", "broadaxe", "bronzeaxe",
22
 
            "sharpaxe", "warriorsaxe"
23
 
        ], self.b.buildings["warmill"].outputs)
24
 
 
25
 
    def test_enhancement(self):
26
 
        assert_equal("warmill", self.b.buildings["axefactory"].enhancement)
27
 
 
28
 
    def test_enhanced_building(self):
29
 
        assert_equal(True, self.b.buildings["warmill"].enhanced_building)
30
 
        assert_equal(False, self.b.buildings["lumberjacks_hut"]
31
 
                     .enhanced_building)
32