1
#####################################################################
2
# -*- coding: iso-8859-1 -*- #
5
# Copyright (C) 2006 Sami Ky�stil� #
7
# This program is free software; you can redistribute it and/or #
8
# modify it under the terms of the GNU General Public License #
9
# as published by the Free Software Foundation; either version 2 #
10
# of the License, or (at your option) any later version. #
12
# This program is distributed in the hope that it will be useful, #
13
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
15
# GNU General Public License for more details. #
17
# You should have received a copy of the GNU General Public License #
18
# along with this program; if not, write to the Free Software #
19
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, #
20
# MA 02110-1301, USA. #
21
#####################################################################
24
from Engine import Engine
25
from Player import Player
26
from World import World
30
class EngineTest(unittest.TestCase):
31
def testStartup(self):
36
e2.connect("localhost")
38
while not e2.isConnected():
46
e1.world.createPlayer("mario")
48
while not len(e2.world.players):
52
assert len(e1.world.players) == 1
53
assert len(e2.world.players) == 1
55
assert e2.world.players[0].name == "mario"
69
if __name__ == "__main__":