~widelands-dev/widelands-website/django_staticfiles

« back to all changes in this revision

Viewing changes to widelandslib/test/test_tribe.py

  • Committer: franku
  • Date: 2016-12-13 18:28:51 UTC
  • mto: This revision was merged to the branch mainline in revision 443.
  • Revision ID: somal@arcor.de-20161213182851-bo5ebf8pdvw5beua
run the script

Show diffs side-by-side

added added

removed removed

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