File tree Expand file tree Collapse file tree 2 files changed +18
-7
lines changed
Expand file tree Collapse file tree 2 files changed +18
-7
lines changed Original file line number Diff line number Diff line change @@ -15,9 +15,6 @@ class BaseServer:
1515 def init (self ):
1616 pass
1717
18- def __str__ (self ):
19- return "BaseServer"
20-
2118
2219@dataclass
2320class WebArenaInstanceVars (BaseServer ):
@@ -51,6 +48,8 @@ def init(self):
5148 unimport_modules (self .module_name )
5249 for key , value in self .make_env_vars ().items ():
5350 os .environ [key ] = value
51+
52+ # this is just a dynamic check to see that the env vars are set correctly
5453 bgym_instance = WebArenaInstance ()
5554 base_url , _ = _split_url (bgym_instance .urls ["reddit" ])
5655 assert base_url == self .base_url , f"Expected { self .base_url } , got { base_url } "
Original file line number Diff line number Diff line change 33
44
55def test_webarena_multiserver ():
6- instance = WebArenaInstanceVars .from_env_vars ()
7- instance_1 = instance .clone ()
8- instance_1 .base_url = "http://webarena1.eastus.cloudapp.azure.com"
6+
7+ instance_1 = WebArenaInstanceVars (
8+ base_url = "http://webarena1.eastus.cloudapp.azure.com" ,
9+ shopping = "8082/" ,
10+ shopping_admin = "8083/admin" ,
11+ reddit = "8080" ,
12+ gitlab = "9001" ,
13+ wikipedia = "8081/wikipedia_en_all_maxi_2022-05/A/User:The_other_Kiwix_guy/Landing" ,
14+ map = "443" ,
15+ homepage = "80" ,
16+ full_reset = "7565" ,
17+ module_name = "webarena" ,
18+ prefix = "WA_" ,
19+ )
20+
921 instance_1 .init ()
1022
1123 bgym_instance = WebArenaInstance ()
1224 base_url_1 = bgym_instance .urls ["reddit" ].rsplit (":" , 1 )[0 ]
1325 assert base_url_1 == instance_1 .base_url
1426
15- instance_2 = instance .clone ()
27+ instance_2 = instance_1 .clone ()
1628 instance_2 .base_url = "http://webarena2.eastus.cloudapp.azure.com"
1729 instance_2 .init ()
1830
You can’t perform that action at this time.
0 commit comments