1
# -*- coding: UTF-8 -*-
5
from IPython import wildcard
11
l=["arna","abel","ABEL","active","bob","bark","abbot"]
12
q=["kate","loop","arne","vito","lucifer","koppel"]
37
class Tests (unittest.TestCase):
41
("a*", ["abbot","abel","active","arna",]),
42
("?b*.?o*",["abbot.koppel","abbot.loop","abel.koppel","abel.loop",]),
44
("_*anka", ["__anka",]),
45
("_*a*", ["__anka",]),
49
a=wildcard.list_namespace(ns,"all",pat,ignore_case=False,show_all=False).keys()
51
self.assertEqual(a,res)
53
def test_case_showall(self):
56
("a*", ["abbot","abel","active","arna",]),
57
("?b*.?o*",["abbot.koppel","abbot.loop","abel.koppel","abel.loop",]),
59
("_*anka", ["__anka",]),
60
("_*a*", ["__anka","_apan",]),
64
a=wildcard.list_namespace(ns,"all",pat,ignore_case=False,show_all=True).keys()
66
self.assertEqual(a,res)
69
def test_nocase(self):
72
("a*", ["abbot","abel","ABEL","active","arna",]),
73
("?b*.?o*",["abbot.koppel","abbot.loop","abel.koppel","abel.loop","ABEL.koppel","ABEL.loop",]),
75
("_*anka", ["__anka","__ANKA",]),
76
("_*a*", ["__anka","__ANKA",]),
80
a=wildcard.list_namespace(ns,"all",pat,ignore_case=True,show_all=False).keys()
82
self.assertEqual(a,res)
84
def test_nocase_showall(self):
87
("a*", ["abbot","abel","ABEL","active","arna",]),
88
("?b*.?o*",["abbot.koppel","abbot.loop","abel.koppel","abel.loop","ABEL.koppel","ABEL.loop",]),
89
("_a*", ["_apan","_APAN"]),
90
("_*anka", ["__anka","__ANKA",]),
91
("_*a*", ["__anka","__ANKA","_apan","_APAN"]),
95
a=wildcard.list_namespace(ns,"all",pat,ignore_case=True,show_all=True).keys()
97
self.assertEqual(a,res)
99
if __name__ == '__main__':
b'\\ No newline at end of file'