Skip to content

Commit

Permalink
Ensured parsing of every element of PatternQuantifier
Browse files Browse the repository at this point in the history
  • Loading branch information
cjarmstrong97 committed Sep 21, 2021
1 parent 96e44ee commit 2de69a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
4 changes: 2 additions & 2 deletions bionetgen/modelapi/xmlparsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ def parse_xml(self, xml) -> Pattern:
quantity = xml["@quantity"]
pattern.relation = relation
try:
n = int(pattern.quantity)
f = float(pattern.quantity)
n = int(quantity)
f = float(quantity)
if n == f:
pattern.quantity = quantity
except ValueError as e:
Expand Down
8 changes: 2 additions & 6 deletions tests/models/hybrid_test.bngl
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@ begin observables
Species R2 R==2
Species R3 R==3
Species R4 R==4
Species R5 R>4
Species R5le R<=4
Species R5l R<4
Species R5ge R>=4
Species R5 R<4
end observables
begin reaction rules
R(l!1).L(r!1) -> R(l) + L(r) koff
Expand All @@ -48,5 +45,4 @@ end population maps
end model

## actions ##
#generate_hybrid_model({overwrite=>1, execute=>1, verbose=>1, safe=>0, actions=>["writeXML()"]})
writeXML()
generate_hybrid_model({overwrite=>1, execute=>1, verbose=>1, safe=>0, actions=>["writeXML()"]})

0 comments on commit 2de69a1

Please sign in to comment.