File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -113,7 +113,8 @@ def __iter__(self):
113113
114114 def partial (self ):
115115 """Return partial of original function call"""
116- return partial (self .data ['func' ], ** self .data ['bound_args' ].arguments )
116+ ba = self .data ['bound_args' ]
117+ return partial (self .data ['func' ], * ba .args , ** ba .kwargs )
117118
118119 def update_child_calls (self ):
119120 """Replace child nodes on original function call with their partials"""
Original file line number Diff line number Diff line change @@ -48,5 +48,17 @@ def test_Fail1_no_lam(self):
4848 self .data ["DC_SCT" ] = helper .remove_lambdas (self .data ["DC_SCT" ])
4949 self .test_Fail1 ()
5050
51+ class TestNestedOr (unittest .TestCase ):
52+ def setUp (self ):
53+ self .data = {
54+ "DC_SOLUTION" : """for ii in range(10): print('yes') if ii < 2 else print('no')""" ,
55+ "DC_SCT" : """test_for_loop(1, body=test_if_exp(body=test_or(test_student_typed('print'))))"""
56+ }
57+
58+ def test_pass (self ):
59+ self .data ["DC_CODE" ] = self .data ["DC_SOLUTION" ]
60+ sct_payload = helper .run (self .data )
61+ self .assertTrue (sct_payload ['correct' ])
62+
5163if __name__ == "__main__" :
5264 unittest .main ()
You can’t perform that action at this time.
0 commit comments