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

Method test_case_showall

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

Source from the content-addressed store, hash-verified

96 self.assertEqual(a, res)
97
98 def test_case_showall(self):
99 ns = root.__dict__
100 tests = [
101 (
102 "a*",
103 [
104 "abbot",
105 "abel",
106 "active",
107 "arna",
108 ],
109 ),
110 (
111 "?b*.?o*",
112 [
113 "abbot.koppel",
114 "abbot.loop",
115 "abel.koppel",
116 "abel.loop",
117 ],
118 ),
119 ("_a*", ["_apan"]),
120 (
121 "_*anka",
122 [
123 "__anka",
124 ],
125 ),
126 (
127 "_*a*",
128 [
129 "__anka",
130 "_apan",
131 ],
132 ),
133 ]
134 for pat, res in tests:
135 res.sort()
136 a = sorted(
137 wildcard.list_namespace(
138 ns, "all", pat, ignore_case=False, show_all=True
139 ).keys()
140 )
141 self.assertEqual(a, res)
142
143 def test_nocase(self):
144 ns = root.__dict__

Callers

nothing calls this directly

Calls 2

sortMethod · 0.80
keysMethod · 0.80

Tested by

no test coverage detected