You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/languages/python/authoring/index.md
+11-11Lines changed: 11 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -165,7 +165,7 @@ The Codewars runner provides a set of preinstalled packages, which are available
165
165
166
166
### Reference solution
167
167
168
-
If the test suite happens to use a reference solution to calculate expected values (which [should be avoided](/authoring/guidelines/submission-tests/#reference-solution) when possible), or some kind of reference data like precalculated arrays, etc., it must not be possible for the user to redefine, overwrite or directly access its contents. To prevent this, it should be defined in a scope local to the testing function, a `it` or a `describe` block.
168
+
If the test suite happens to use a reference solution to calculate expected values (which [should be avoided](/authoring/guidelines/submission-tests/#reference-solution) when possible), or some kind of reference data like precalculated lists, etc., it must not be possible for the user to redefine, overwrite or directly access its contents. To prevent this, it should be defined in a scope local to the testing function, a `it` or a `describe` block.
169
169
170
170
The reference solution or data ___must not___ be defined in the top-level scope of the test suite or in the [Preloaded code](/authoring/guidelines/preloaded/).
171
171
@@ -206,8 +206,8 @@ def fixed_tests():
206
206
207
207
@test.it('Edge cases')
208
208
defedge_cases():
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")
209
+
test.assert_equals(user_solution([]), 0, "Invalid answer for empty list")
210
+
test.assert_equals(user_solution([2]), 2, "Invalid answer for one element list")
211
211
212
212
@test.it('Input should not be modified')
213
213
defdo_not_mutate_input():
@@ -217,7 +217,7 @@ def fixed_tests():
217
217
#call user solution and ignore the result
218
218
user_solution(arr_copy)
219
219
#arr_copy should not be modified
220
-
test.assert_equals(arr_copy, source_arr, 'Input array was modified')
220
+
test.assert_equals(arr_copy, source_arr, 'Input list was modified')
221
221
222
222
223
223
@test.describe('Random tests')
@@ -233,20 +233,20 @@ def random_tests():
233
233
defgenerate_small_inputs():
234
234
test_cases = []
235
235
236
-
#first type of input: regular array of small inputs (many of them)
236
+
#first type of input: regular list of small inputs (many of them)
237
237
for _ inrange(50):
238
238
test_cases.append(generate_small_test_case())
239
239
240
-
#another type of input: array with potentially tricky numbers
240
+
#another type of input: list with potentially tricky numbers
0 commit comments