Skip to content

Commit 23e3cac

Browse files
committed
Improved test of randomize with lambda
1 parent 905f09a commit 23e3cac

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

tutorial/tests/test_12_functions_advanced.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,7 @@ def test_randomize_list(
5656
if len(my_list) > 2:
5757
# Check there's at least some variation in results
5858
assert len({tuple(r) for r in results}) > 1, (
59-
"Function doesn't appear to randomize"
60-
)
61-
62-
# Ensure it's not just returning sorted lists
63-
sorted_list = sorted(my_list)
64-
assert not all(r == sorted_list for r in results), (
65-
"Function appears to just sort the list"
66-
)
67-
68-
# Ensure it's not just returning the original list
69-
assert not all(r == my_list for r in results), (
70-
"Function appears to return the original list"
59+
"Function doesn't appear to randomize. You should not use random.seed()."
7160
)
7261

7362

0 commit comments

Comments
 (0)