Skip to content

Commit

Permalink
Fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoeilers committed Aug 28, 2023
1 parent f3ddbc0 commit db02d11
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/nagini_translation/models/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,8 @@ def convert_sequence_value(self, val, content_type, object_name):

def convert_tuple_value(self, val, tuple_type: GenericType, object_name):
res = OrderedDict()
if 'tuple___getitem__' not in self.model:
return '?'
value_func = self.model['tuple___getitem__']
if tuple_type.exact_length:
res['len({})'.format(object_name)] = len(tuple_type.type_args)
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/verification/test_tuples.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def something_2(s: str, a: Tuple[str, int]) -> Tuple[str, str, int]:
def something_3(s: int, hurgh: Tuple[int, ...]) -> None:
Requires(len(hurgh) > 2 and hurgh[1] > 8)
if len(hurgh) > 5:
#:: ExpectedOutput(assert.violated:assertion.false)
#:: ExpectedOutput(assert.failed:assertion.false)
Assert(hurgh[4] != s)


Expand Down

0 comments on commit db02d11

Please sign in to comment.