MCPcopy
hub / github.com/django/django / test_hash_item_key

Method test_hash_item_key

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

Source from the content-addressed store, hash-verified

52 self.assertEqual(actual, expected)
53
54 def test_hash_item_key(self):
55 cases = [
56 (lambda x: x, "64ad3fb166ddb41a2ca24f1803b8b722"),
57 (lambda x: x.upper(), "ee22e8597bff91742affe4befbf4649a"),
58 ]
59 for key, expected in cases:
60 with self.subTest(key=key):
61 shuffler = Shuffler(seed=1234)
62 actual = shuffler._hash_item("abc", key)
63 self.assertEqual(actual, expected)
64
65 def test_shuffle_key(self):
66 cases = [

Callers

nothing calls this directly

Calls 2

_hash_itemMethod · 0.95
ShufflerClass · 0.90

Tested by

no test coverage detected