소스 검색

attr_assign partially works

Yentl Van Tendeloo 8 년 전
부모
커밋
c250bf6a3f
2개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      wrappers/modelverse.py
  2. 3 0
      wrappers/test_modelverse.py

+ 1 - 0
wrappers/modelverse.py

@@ -454,6 +454,7 @@ def attr_assign(ID, attr, value):
     _input(ID)
     _input(attr)
     _input(value)
+    _consume_to_end()
 
 def attr_assign_code(ID, attr, code):
     """Assign a piece of Action Language code to the attribute"""

+ 3 - 0
wrappers/test_modelverse.py

@@ -43,3 +43,6 @@ except InvalidMode:
                 print(instantiate("T2P", ("t1", "p2")))
                 print(element_list())
                 print(read_attrs("p1"))
+                attr_assign("p1", "name", "abc")
+                attr_assign("p1", "tokens", 1)
+                print(read_attrs("p1"))