Skip to content

Commit

Permalink
Avoid test failures by adding a 'reporter' attributed to 'state_machine'
Browse files Browse the repository at this point in the history
also pass 'name=' for what appear to be names for the Mock objects

---
Signed-off-by: Michael Ferguson <[email protected]>
  • Loading branch information
mppf committed Apr 8, 2024
1 parent b6bb0e4 commit 9664dde
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions test/test_chapeldomain.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,14 +169,14 @@ def new_obj(self, objtype, **kwargs):
"""Return new mocked out ChapelObject"""
default_args = {
'name': 'my-chpl',
'arguments': mock.Mock('arguments'),
'options': mock.Mock('options'),
'content': mock.Mock('content'),
'lineno': mock.Mock('lineno'),
'content_offset': mock.Mock('content_offset'),
'block_text': mock.Mock('block_text'),
'state': mock.Mock('state'),
'state_machine': mock.Mock('state_machine'),
'arguments': mock.Mock(name='arguments'),
'options': mock.Mock(name='options'),
'content': mock.Mock(name='content'),
'lineno': mock.Mock(name='lineno'),
'content_offset': mock.Mock(name='content_offset'),
'block_text': mock.Mock(name='block_text'),
'state': mock.Mock(name='state'),
'state_machine': mock.Mock(name='state_machine', spec=["reporter",]),
}
default_args.update(kwargs)
o = self.object_cls(**default_args)
Expand Down

0 comments on commit 9664dde

Please sign in to comment.