MCPcopy Create free account
hub / github.com/dwavesystems/dwave-cloud-client / test_uniform_iterator

Method test_uniform_iterator

tests/test_utils.py:66–69  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

64class TestSimpleUtils(unittest.TestCase):
65
66 def test_uniform_iterator(self):
67 items = [('a', 1), ('b', 2)]
68 self.assertEqual(list(uniform_iterator(OrderedDict(items))), items)
69 self.assertEqual(list(uniform_iterator('ab')), list(enumerate('ab')))
70
71 def test_uniform_get(self):
72 d = {0: 0, 1: 1}

Callers

nothing calls this directly

Calls 1

uniform_iteratorFunction · 0.90

Tested by

no test coverage detected