Atlas  0.7.0
Networking protocol for the Worldforge system.
test_objects.py
1 #test objects used by various test_*.py
2 
3 #Copyright 2000, 2001 by Aloril
4 
5 #This library is free software; you can redistribute it and/or
6 #modify it under the terms of the GNU Lesser General Public
7 #License as published by the Free Software Foundation; either
8 #version 2.1 of the License, or (at your option) any later version.
9 
10 #This library is distributed in the hope that it will be useful,
11 #but WITHOUT ANY WARRANTY; without even the implied warranty of
12 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 #Lesser General Public License for more details.
14 
15 #You should have received a copy of the GNU Lesser General Public
16 #License along with this library; if not, write to the Free Software
17 #Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 
19 
20 import atlas
21 import importlib
22 importlib.reload(atlas)
23 from atlas import *
24 
25 lst_simple = [Object(j=7), [5.2, "87"]]
26 obj_simple = Object(i=3, fl=-42.8, hello="Hello world!")
27 human_class = Object(id="human", objtype="class", parents=["living"], description="Humans have two foots")
28 ent = Object(id="12", objtype="object", parents=[human_class], pos=[4.5, 6.5, -1.0])
29 move_op = Object(objtype="op", parents=["move"], args=[ent])
30 sight_op = Object(objtype="op", parents=["sight"], from_=ent, args=[move_op])
31 msg = Messages(obj_simple, human_class, ent, move_op, sight_op)