Show More
@@ -115,3 +115,19 class Tests (unittest.TestCase): | |||
|
115 | 115 | show_all=True).keys() |
|
116 | 116 | a.sort() |
|
117 | 117 | self.assertEqual(a,res) |
|
118 | ||
|
119 | def test_dict_attributes(self): | |
|
120 | """Dictionaries should be indexed by attributes, not by keys. This was | |
|
121 | causing Github issue 129.""" | |
|
122 | ns = {"az":{"king":55}, "pq":{1:0}} | |
|
123 | tests = [ | |
|
124 | ("a*", ["az"]), | |
|
125 | ("az.k*", ["az.keys"]), | |
|
126 | ("pq.k*", ["pq.keys"]) | |
|
127 | ] | |
|
128 | for pat, res in tests: | |
|
129 | res.sort() | |
|
130 | a = wildcard.list_namespace(ns, "all", pat, ignore_case=False, | |
|
131 | show_all=True).keys() | |
|
132 | a.sort() | |
|
133 | self.assertEqual(a, res) |
General Comments 0
You need to be logged in to leave comments.
Login now