1- import sys
2-
3-
4- class RemoteTestLibrary :
5-
1+ class AcceptanceTestLibrary :
62 _unicode = (u'Hyv\u00E4 \u00E4 y\u00F6 t\u00E4 . '
73 u'\u0421 \u043F \u0430 \u0441 \u0438 \u0431 \u043E !' )
84
9- def get_server_language (self ):
10- lang = sys .platform .startswith ('java' ) and 'jython' or 'python'
11- return '%s%d%d' % (lang , sys .version_info [0 ], sys .version_info [1 ])
12-
135 # Basic communication (and documenting keywords)
146
157 def passing (self ):
@@ -79,15 +71,6 @@ def assertion_error(self):
7971 def runtime_error (self ):
8072 raise RuntimeError ('Error message' )
8173
82- def name_error (self ):
83- non_existing
84-
85- def attribute_error (self ):
86- self .non_existing
87-
88- def index_error (self ):
89- [][0 ]
90-
9174 def zero_division (self ):
9275 1 / 0
9376
@@ -176,7 +159,7 @@ def list_containing_objects_as_argument(self, arg):
176159 self ._should_be_equal (arg , ['<MyObject1>' , '<MyObject2>' ])
177160
178161 def nested_list_as_argument (self , arg ):
179- exp = [ [True , False ], [[1 , '' , '<MyObject>' , {}]] ]
162+ exp = [[True , False ], [[1 , '' , '<MyObject>' , {}]]]
180163 self ._should_be_equal (arg , exp )
181164
182165 def dictionary_as_argument (self , arg ):
@@ -195,8 +178,8 @@ def dictionary_containing_objects_as_argument(self, arg):
195178 self ._should_be_equal (arg , {'As value' : '<MyObject1>' , '<MyObject2>' : 'As key' })
196179
197180 def nested_dictionary_as_argument (self , arg ):
198- exp = { '1' : {'' : False },
199- '2' : {'A' : {'n' : '' }, 'B' : {'o' : '<MyObject>' , 'e' : {}}} }
181+ exp = {'1' : {'' : False },
182+ '2' : {'A' : {'n' : '' }, 'B' : {'o' : '<MyObject>' , 'e' : {}}}}
200183 self ._should_be_equal (arg , exp )
201184
202185 def _should_be_equal (self , arg , exp ):
@@ -257,7 +240,7 @@ def return_list_containing_objects(self):
257240 return [MyObject (1 ), MyObject (2 )]
258241
259242 def return_nested_list (self ):
260- return [ [True , False ], [[1 , None , MyObject (), {}]] ]
243+ return [[True , False ], [[1 , None , MyObject (), {}]]]
261244
262245 def return_tuple (self ):
263246 return (1 , 'two' , True )
@@ -266,7 +249,7 @@ def return_empty_tuple(self):
266249 return ()
267250
268251 def return_nested_tuple (self ):
269- return ( (True , False ), [(1 , None , MyObject (), {})] )
252+ return ((True , False ), [(1 , None , MyObject (), {})])
270253
271254 def return_dictionary (self ):
272255 return {'one' : 1 , 'spam' : 'eggs' }
@@ -284,8 +267,8 @@ def return_dictionary_containing_objects(self):
284267 return {'As value' : MyObject (1 ), MyObject (2 ): 'As key' }
285268
286269 def return_nested_dictionary (self ):
287- return { 1 : {None : False },
288- 2 : {'A' : {'n' : None }, 'B' : {'o' : MyObject (), 'e' : {}}} }
270+ return {1 : {None : False },
271+ 2 : {'A' : {'n' : None }, 'B' : {'o' : MyObject (), 'e' : {}}}}
289272
290273 # Not keywords
291274
@@ -312,4 +295,4 @@ class MyException(Exception):
312295 import sys
313296 from robotremoteserver import RobotRemoteServer
314297
315- RobotRemoteServer (RemoteTestLibrary (), * sys .argv [1 :])
298+ RobotRemoteServer (AcceptanceTestLibrary (), * sys .argv [1 :])
0 commit comments