We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9cf0754 commit 0fc9fdbCopy full SHA for 0fc9fdb
algorithms/tests/test_shuffling.py
@@ -16,10 +16,10 @@ class TestKnuthShuffle(ShufflingAlgorithmTestCase):
16
"""
17
def test_knuthshuffle(self):
18
self.shuffle = knuth.shuffle(range(10))
19
+ self.not_shuffled = 0
20
- for i in self.shuffle:
21
- not_shuffled = 0
22
- if i == self.sorted[i]:
23
- not_shuffled = not_shuffled + 1
+ for i in self.sorted:
+ if i == self.shuffle[i]:
+ self.not_shuffled = self.not_shuffled + 1
24
25
- self.assertGreater(2, not_shuffled)
+ self.assertGreater(4, self.not_shuffled)
0 commit comments