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

Method test_nocase

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

Source from the content-addressed store, hash-verified

141 self.assertEqual(a, res)
142
143 def test_nocase(self):
144 ns = root.__dict__
145 tests = [
146 (
147 "a*",
148 [
149 "abbot",
150 "abel",
151 "ABEL",
152 "active",
153 "arna",
154 ],
155 ),
156 (
157 "?b*.?o*",
158 [
159 "abbot.koppel",
160 "abbot.loop",
161 "abel.koppel",
162 "abel.loop",
163 "ABEL.koppel",
164 "ABEL.loop",
165 ],
166 ),
167 ("_a*", []),
168 (
169 "_*anka",
170 [
171 "__anka",
172 "__ANKA",
173 ],
174 ),
175 (
176 "_*a*",
177 [
178 "__anka",
179 "__ANKA",
180 ],
181 ),
182 ]
183 for pat, res in tests:
184 res.sort()
185 a = sorted(
186 wildcard.list_namespace(
187 ns, "all", pat, ignore_case=True, show_all=False
188 ).keys()
189 )
190 self.assertEqual(a, res)
191
192 def test_nocase_showall(self):
193 ns = root.__dict__

Callers

nothing calls this directly

Calls 2

sortMethod · 0.80
keysMethod · 0.80

Tested by

no test coverage detected