MCPcopy Index your code
hub / github.com/ipython/ipython / test_nocase_showall

Method test_nocase_showall

tests/test_wildcard.py:192–234  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

190 self.assertEqual(a, res)
191
192 def test_nocase_showall(self):
193 ns = root.__dict__
194 tests = [
195 (
196 "a*",
197 [
198 "abbot",
199 "abel",
200 "ABEL",
201 "active",
202 "arna",
203 ],
204 ),
205 (
206 "?b*.?o*",
207 [
208 "abbot.koppel",
209 "abbot.loop",
210 "abel.koppel",
211 "abel.loop",
212 "ABEL.koppel",
213 "ABEL.loop",
214 ],
215 ),
216 ("_a*", ["_apan", "_APAN"]),
217 (
218 "_*anka",
219 [
220 "__anka",
221 "__ANKA",
222 ],
223 ),
224 ("_*a*", ["__anka", "__ANKA", "_apan", "_APAN"]),
225 ]
226 for pat, res in tests:
227 res.sort()
228 a = sorted(
229 wildcard.list_namespace(
230 ns, "all", pat, ignore_case=True, show_all=True
231 ).keys()
232 )
233 a.sort()
234 self.assertEqual(a, res)
235
236 def test_dict_attributes(self):
237 """Dictionaries should be indexed by attributes, not by keys. This was

Callers

nothing calls this directly

Calls 2

sortMethod · 0.80
keysMethod · 0.80

Tested by

no test coverage detected