Skip to content

Commit 7808683

Browse files
committed
Add additional test
1 parent 47af3ee commit 7808683

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

src/psyclone/tests/psyGen_test.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,22 @@ def apply(self, node, **kwargs):
220220
# Check that we allow the fetching of the TestTrans option.
221221
assert trans.get_option("valid", valid=True)
222222

223+
# Test that we use current transformations default value
224+
# over an inherited value.
225+
class TestTrans3(Transformation):
226+
'''Utility transformation to test methods of the abstract
227+
Transformation class with _SUB_TRANSFORMATIONS.'''
228+
_SUB_TRANSFORMATIONS = [TestTrans]
229+
230+
def apply(self, node, valid=False, **kwargs):
231+
...
232+
opts = {}
233+
trans = TestTrans3()
234+
# Check that we get the default False for the valid option.
235+
assert not trans.get_option("valid", **opts)
236+
237+
238+
223239

224240
def test_transformation_split_kwargs():
225241
''' Test that the kwargs can be split when they can be propagated to

0 commit comments

Comments
 (0)