Skip to content

Commit af7ce77

Browse files
committed
revert tests from using 1-based-indexing
1 parent 05be248 commit af7ce77

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

tests/test_test_wiki.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,10 @@ def test_pass_simple(self):
193193
L2 = [i*2 for i in range(0,10) if i>2]
194194
''',
195195
"DC_SCT": '''
196-
list_comp = Ex().check_list_comp(1, missing_msg="Did you include a list comprehension?")
196+
list_comp = Ex().check_list_comp(0, missing_msg="Did you include a list comprehension?")
197197
list_comp.check_body().test_student_typed('i\*2')
198198
list_comp.check_iter().has_equal_value()
199-
list_comp.check_ifs(1).multi([has_equal_value(context_vals=[i]) for i in range(0,10)])
199+
list_comp.check_ifs(0).multi([has_equal_value(context_vals=[i]) for i in range(0,10)])
200200
'''
201201
}
202202
self.data["DC_CODE"] = "L2 = [i*2 for i in range(10) if i>2]"
@@ -207,10 +207,10 @@ def test_pass_complex1(self):
207207
self.data = {
208208
"DC_SOLUTION": """L3 = [i*2 if i> 5 else 0 for i in range(0,10)]""",
209209
"DC_SCT": """
210-
(Ex().check_list_comp(1) # first comptehension
210+
(Ex().check_list_comp(0) # first comptehension
211211
.check_body() # comp's body
212212
.set_context(i=6)
213-
.check_if_exp(1) # body's inline if
213+
.check_if_exp(0) # body's inline if
214214
.has_equal_value()
215215
)
216216
"""
@@ -223,10 +223,10 @@ def test_fail_complex1(self):
223223
self.data = {
224224
"DC_SOLUTION": """L3 = [i*2 if i> 5 else 0 for i in range(0,10)]""",
225225
"DC_SCT": """
226-
(Ex().check_list_comp(1) # first comptehension
226+
(Ex().check_list_comp(0) # first comptehension
227227
.check_body() # comp's body
228228
.set_context(i=6)
229-
.check_if_exp(1) # body's inline if
229+
.check_if_exp(0) # body's inline if
230230
.has_equal_value()
231231
)
232232
"""
@@ -239,7 +239,7 @@ def test_pass_complex2(self):
239239
self.data = {
240240
"DC_SOLUTION": """L3 = [i*2 if i> 5 else 0 for i in range(0,10)]""",
241241
"DC_SCT": """
242-
(Ex().check_list_comp(1) # first comptehension
242+
(Ex().check_list_comp(0) # first comptehension
243243
.check_body().set_context(i=6).has_equal_value()
244244
)
245245
"""

0 commit comments

Comments
 (0)