浏览代码

Fixed failing test: should of course define Integer first

Yentl Van Tendeloo 9 年之前
父节点
当前提交
dae8ebb0b6
共有 3 个文件被更改,包括 5 次插入3 次删除
  1. 1 1
      bootstrap/modelling.alc
  2. 3 1
      integration/test_constructors_models.py
  3. 1 1
      integration/utils.py

+ 1 - 1
bootstrap/modelling.alc

@@ -96,7 +96,7 @@ Element function find_attribute_type(model : Element, elem : String, name : Stri
 
 	log("Search for type of " + elem)
 	direct_type = dict_read_node(model["type_mapping"], model["model"][elem])
-	print("Direct type: " + cast_e2s(direct_type))
+	log("Direct type: " + cast_e2s(direct_type))
 	mm_elem = find_attribute_definer(model["metamodel"], direct_type, name)
 
 	if (element_eq(mm_elem, read_root())):

+ 3 - 1
integration/test_constructors_models.py

@@ -20,6 +20,7 @@ bottom = [
         '"add_node"', 1, '"Type"',
         '"add_node"', 1, '"Any"',
         '"add_node"', 1, '"String"',
+        '"add_node"', 1, '"Integer"',
         '"add_value"', 1, '"inheritance"', '"inheritance"',
         '"add_value"', 1, '"link"', '"link"',
         '"add_value"', 1, '"name"', '"name"',
@@ -43,6 +44,7 @@ retype = [
         '"retype"', 1, '"Type"', '"Class"',
         '"retype"', 1, '"Any"', '"Class"',
         '"retype"', 1, '"String"', '"Type"',
+        '"retype"', 1, '"Integer"', '"Type"',
         '"retype"', 1, '"inheritance"', '"String"',
         '"retype"', 1, '"link"', '"String"',
         '"retype"', 1, '"name"', '"String"',
@@ -63,7 +65,7 @@ bottom_attributes = [
         '"instantiate_link"', 1, '"Association"', '"lc"', '"Class"', '"Integer"',
         '"instantiate_attribute"', 1, '"lc"', '"name"', '"lower_cardinality"',
         '"instantiate_link"', 1, '"Association"', '"uc"', '"Class"', '"Integer"',
-        '"instantiate_attribute"', 1, '"lc"', '"name"', '"upper_cardinality"',
+        '"instantiate_attribute"', 1, '"uc"', '"name"', '"upper_cardinality"',
         '"instantiate_link"', 1, '"Association"', '"slc"', '"Association"', '"Integer"',
         '"instantiate_attribute"', 1, '"slc"', '"name"', '"source_lower_cardinality"',
         '"instantiate_link"', 1, '"Association"', '"suc"', '"Association"', '"Integer"',

+ 1 - 1
integration/utils.py

@@ -266,12 +266,12 @@ def run_barebone(parameters, expected, interface="0", timeout=False, wait=False,
             c = len(e) if isinstance(e, set) else 1
             for _ in range(c):
                 try:
-                    val = urllib2.urlopen(urllib2.Request(address, urllib.urlencode({"op": "get_output", "username": username})), timeout=15).read()
                     proc.poll()
                     if proc.returncode is not None:
                         # Modelverse has already terminated, which isn't a good sign!
                         return False
 
+                    val = urllib2.urlopen(urllib2.Request(address, urllib.urlencode({"op": "get_output", "username": username})), timeout=15).read()
                 except:
                     if timeout:
                         return True