Python: DeckKeyword: can accept DeckValues( parserkw, [["5*$VALUE"]])

python : deckkeyword accepts 5*.

...
This commit is contained in:
Steinar Foss
2019-10-07 09:51:08 +02:00
parent 7555c00ac3
commit 3bce48586a
2 changed files with 40 additions and 9 deletions

View File

@@ -98,7 +98,15 @@ FIPNUM
with self.assertRaises(TypeError):
DeckKeyword(parser["CBMOPTS"], [["3*", "A", "B", "C", "R2*", 0.77]])
with self.assertRaises(TypeError):
DeckKeyword(parser["CBMOPTS"], [["3*", "A", "B", "C", "2.2*", 0.77]])
dkw5 = DeckKeyword(parser["AQUCWFAC"], [["2*5.5"]])
assert( dkw5[0][0][0] == 5.5 )
assert( dkw5[0][1][0] == 5.5 )
with self.assertRaises(ValueError):
raise DeckKeyword(parser["AQANTRC"], [["1*2.2", "ABC", 8]])