Skip to content

Commit f3463a8

Browse files
authored
Update index.md (#255)
1 parent 3705e99 commit f3463a8

File tree

1 file changed

+8
-8
lines changed
  • content/languages/python/authoring

1 file changed

+8
-8
lines changed

content/languages/python/authoring/index.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -201,23 +201,23 @@ def fixed_tests():
201201

202202
@test.it('Regular cases')
203203
def regular_cases():
204-
test.assert_equals(6, user_solution([1, 2, 3]))
205-
test.assert_equals(5, user_solution([2, 3]))
204+
test.assert_equals(user_solution([1, 2, 3]), 6)
205+
test.assert_equals(user_solution([2, 3]), 5)
206206

207207
@test.it('Edge cases')
208208
def edge_cases():
209-
test.assert_equals(0, user_solution([]), "Invalid answer for empty array")
210-
test.assert_equals(2, user_solution([2]), "Invalid answer for one element array")
209+
test.assert_equals(user_solution([]), 0, "Invalid answer for empty array")
210+
test.assert_equals(user_solution([2]), 2, "Invalid answer for one element array")
211211

212212
@test.it('Input should not be modified')
213213
def do_not_mutate_input():
214-
arr = list(range(100))
215-
random.shuffle(arr)
216-
arr_copy = arr[:]
214+
source_arr = list(range(100))
215+
random.shuffle(source_arr)
216+
arr_copy = source_arr[:]
217217
#call user solution and ignore the result
218218
user_solution(arr_copy)
219219
#arr_copy should not be modified
220-
test.assert_equals(arr_copy, arr, 'Input array was modified')
220+
test.assert_equals(arr_copy, source_arr, 'Input array was modified')
221221

222222

223223
@test.describe('Random tests')

0 commit comments

Comments
 (0)