MCPcopy Index your code
hub / github.com/clips/pattern / test_odict

Method test_odict

test/test_search.py:62–72  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

60 print "pattern.search.variations()"
61
62 def test_odict(self):
63 # Assert odict.append() which must be order-preserving.
64 v = search.odict()
65 v.push(("a", 1))
66 v.push(("b", 2))
67 v.push(("c", 3))
68 v.push(("a", 0))
69 v = v.copy()
70 self.assertTrue(isinstance(v, dict))
71 self.assertEqual(v.keys(), ["a", "c","b"])
72 print "pattern.search.odict()"
73
74#---------------------------------------------------------------------------------------------------
75

Callers

nothing calls this directly

Calls 3

pushMethod · 0.45
copyMethod · 0.45
keysMethod · 0.45

Tested by

no test coverage detected