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

Method test_case

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

Source from the content-addressed store, hash-verified

52
53class Tests(unittest.TestCase):
54 def test_case(self):
55 ns = root.__dict__
56 tests = [
57 (
58 "a*",
59 [
60 "abbot",
61 "abel",
62 "active",
63 "arna",
64 ],
65 ),
66 (
67 "?b*.?o*",
68 [
69 "abbot.koppel",
70 "abbot.loop",
71 "abel.koppel",
72 "abel.loop",
73 ],
74 ),
75 ("_a*", []),
76 (
77 "_*anka",
78 [
79 "__anka",
80 ],
81 ),
82 (
83 "_*a*",
84 [
85 "__anka",
86 ],
87 ),
88 ]
89 for pat, res in tests:
90 res.sort()
91 a = sorted(
92 wildcard.list_namespace(
93 ns, "all", pat, ignore_case=False, show_all=False
94 ).keys()
95 )
96 self.assertEqual(a, res)
97
98 def test_case_showall(self):
99 ns = root.__dict__

Callers

nothing calls this directly

Calls 2

sortMethod · 0.80
keysMethod · 0.80

Tested by

no test coverage detected