MCPcopy
hub / github.com/django/django / test_hash_item_seed

Method test_hash_item_seed

tests/test_runner/test_shuffler.py:41–52  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

39 self.assertEqual(shuffler.seed_display, "100 (test)")
40
41 def test_hash_item_seed(self):
42 cases = [
43 (1234, "64ad3fb166ddb41a2ca24f1803b8b722"),
44 # Passing a string gives the same value.
45 ("1234", "64ad3fb166ddb41a2ca24f1803b8b722"),
46 (5678, "4dde450ad339b6ce45a0a2666e35b975"),
47 ]
48 for seed, expected in cases:
49 with self.subTest(seed=seed):
50 shuffler = Shuffler(seed=seed)
51 actual = shuffler._hash_item("abc", lambda x: x)
52 self.assertEqual(actual, expected)
53
54 def test_hash_item_key(self):
55 cases = [

Callers

nothing calls this directly

Calls 2

_hash_itemMethod · 0.95
ShufflerClass · 0.90

Tested by

no test coverage detected