Home | History | Annotate | Download | only in test

Lines Matching refs:tester

15 def tester(fn, wantResult):
22 tester('ntpath.splitext("foo.ext")', ('foo', '.ext'))
23 tester('ntpath.splitext("/foo/foo.ext")', ('/foo/foo', '.ext'))
24 tester('ntpath.splitext(".ext")', ('.ext', ''))
25 tester('ntpath.splitext("\\foo.ext\\foo")', ('\\foo.ext\\foo', ''))
26 tester('ntpath.splitext("foo.ext\\")', ('foo.ext\\', ''))
27 tester('ntpath.splitext("")', ('', ''))
28 tester('ntpath.splitext("foo.bar.ext")', ('foo.bar', '.ext'))
29 tester('ntpath.splitext("xx/foo.bar.ext")', ('xx/foo.bar', '.ext'))
30 tester('ntpath.splitext("xx\\foo.bar.ext")', ('xx\\foo.bar', '.ext'))
31 tester('ntpath.splitext("c:a/b\\c.d")', ('c:a/b\\c', '.d'))
34 tester('ntpath.splitdrive("c:\\foo\\bar")',
36 tester('ntpath.splitdrive("c:/foo/bar")',
38 tester('ntpath.splitdrive("\\\\conky\\mountpoint\\foo\\bar")',
40 tester('ntpath.splitdrive("//conky/mountpoint/foo/bar")',
42 tester('ntpath.splitdrive("\\\\\\conky\\mountpoint\\foo\\bar")',
44 tester('ntpath.splitdrive("///conky/mountpoint/foo/bar")',
46 tester('ntpath.splitdrive("\\\\conky\\\\mountpoint\\foo\\bar")',
48 tester('ntpath.splitdrive("//conky//mountpoint/foo/bar")',
56 tester('ntpath.splitunc("c:\\foo\\bar")',
58 tester('ntpath.splitunc("c:/foo/bar")',
60 tester('ntpath.splitunc("\\\\conky\\mountpoint\\foo\\bar")',
62 tester('ntpath.splitunc("//conky/mountpoint/foo/bar")',
64 tester('ntpath.splitunc("\\\\\\conky\\mountpoint\\foo\\bar")',
66 tester('ntpath.splitunc("///conky/mountpoint/foo/bar")',
68 tester('ntpath.splitunc("\\\\conky\\\\mountpoint\\foo\\bar")',
70 tester('ntpath.splitunc("//conky//mountpoint/foo/bar")',
77 tester('ntpath.split("c:\\foo\\bar")', ('c:\\foo', 'bar'))
78 tester('ntpath.split("\\\\conky\\mountpoint\\foo\\bar")',
81 tester('ntpath.split("c:\\")', ('c:\\', ''))
82 tester('ntpath.split("\\\\conky\\mountpoint\\")',
85 tester('ntpath.split("c:/")', ('c:/', ''))
86 tester('ntpath.split("//conky/mountpoint/")', ('//conky/mountpoint/', ''))
89 tester('ntpath.isabs("c:\\")', 1)
90 tester('ntpath.isabs("\\\\conky\\mountpoint\\")', 1)
91 tester('ntpath.isabs("\\foo")', 1)
92 tester('ntpath.isabs("\\foo\\bar")', 1)
95 tester('ntpath.commonprefix(["/home/swenson/spam", "/home/swen/spam"])',
97 tester('ntpath.commonprefix(["\\home\\swen\\spam", "\\home\\swen\\eggs"])',
99 tester('ntpath.commonprefix(["/home/swen/spam", "/home/swen/spam"])',
103 tester('ntpath.join("")', '')
104 tester('ntpath.join("", "", "")', '')
105 tester('ntpath.join("a")', 'a')
106 tester('ntpath.join("/a")', '/a')
107 tester('ntpath.join("\\a")', '\\a')
108 tester('ntpath.join("a:")', 'a:')
109 tester('ntpath.join("a:", "\\b")', 'a:\\b')
110 tester('ntpath.join("a", "\\b")', '\\b')
111 tester('ntpath.join("a", "b", "c")', 'a\\b\\c')
112 tester('ntpath.join("a\\", "b", "c")', 'a\\b\\c')
113 tester('ntpath.join("a", "b\\", "c")', 'a\\b\\c')
114 tester('ntpath.join("a", "b", "\\c")', '\\c')
115 tester('ntpath.join("d:\\", "\\pleep")', 'd:\\pleep')
116 tester('ntpath.join("d:\\", "a", "b")', 'd:\\a\\b')
118 tester("ntpath.join('', 'a')", 'a')
119 tester("ntpath.join('', '', '', '', 'a')", 'a')
120 tester("ntpath.join('a', '')", 'a\\')
121 tester("ntpath.join('a', '', '', '', '')", 'a\\')
122 tester("ntpath.join('a\\', '')", 'a\\')
123 tester("ntpath.join('a\\', '', '', '', '')", 'a\\')
124 tester("ntpath.join('a/', '')", 'a/')
126 tester("ntpath.join('a/b', 'x/y')", 'a/b\\x/y')
127 tester("ntpath.join('/a/b', 'x/y')", '/a/b\\x/y')
128 tester("ntpath.join('/a/b/', 'x/y')", '/a/b/x/y')
129 tester("ntpath.join('c:', 'x/y')", 'c:x/y')
130 tester("ntpath.join('c:a/b', 'x/y')", 'c:a/b\\x/y')
131 tester("ntpath.join('c:a/b/', 'x/y')", 'c:a/b/x/y')
132 tester("ntpath.join('c:/', 'x/y')", 'c:/x/y')
133 tester("ntpath.join('c:/a/b', 'x/y')", 'c:/a/b\\x/y')
134 tester("ntpath.join('c:/a/b/', 'x/y')", 'c:/a/b/x/y')
135 tester("ntpath.join('//computer/share', 'x/y')", '//computer/share\\x/y')
136 tester("ntpath.join('//computer/share/', 'x/y')", '//computer/share/x/y')
137 tester("ntpath.join('//computer/share/a/b', 'x/y')", '//computer/share/a/b\\x/y')
139 tester("ntpath.join('a/b', '/x/y')", '/x/y')
140 tester("ntpath.join('/a/b', '/x/y')", '/x/y')
141 tester("ntpath.join('c:', '/x/y')", 'c:/x/y')
142 tester("ntpath.join('c:a/b', '/x/y')", 'c:/x/y')
143 tester("ntpath.join('c:/', '/x/y')", 'c:/x/y')
144 tester("ntpath.join('c:/a/b', '/x/y')", 'c:/x/y')
145 tester("ntpath.join('//computer/share', '/x/y')", '//computer/share/x/y')
146 tester("ntpath.join('//computer/share/', '/x/y')", '//computer/share/x/y')
147 tester("ntpath.join('//computer/share/a', '/x/y')", '//computer/share/x/y')
149 tester("ntpath.join('c:', 'C:x/y')", 'C:x/y')
150 tester("ntpath.join('c:a/b', 'C:x/y')", 'C:a/b\\x/y')
151 tester("ntpath.join('c:/', 'C:x/y')", 'C:/x/y')
152 tester("ntpath.join('c:/a/b', 'C:x/y')", 'C:/a/b\\x/y')
156 tester("ntpath.join(%r, %r)" % (x, y), y)
159 tester("ntpath.normpath('A//////././//.//B')", r'A\B')
160 tester("ntpath.normpath('A/./B')", r'A\B')
161 tester("ntpath.normpath('A/foo/../B')", r'A\B')
162 tester("ntpath.normpath('C:A//B')", r'C:A\B')
163 tester("ntpath.normpath('D:A/./B')", r'D:A\B')
164 tester("ntpath.normpath('e:A/foo/../B')", r'e:A\B')
166 tester("ntpath.normpath('C:///A//B')", r'C:\A\B')
167 tester("ntpath.normpath('D:///A/./B')", r'D:\A\B')
168 tester("ntpath.normpath('e:///A/foo/../B')", r'e:\A\B')
170 tester("ntpath.normpath('..')", r'..')
171 tester("ntpath.normpath('.')", r'.')
172 tester("ntpath.normpath('')", r'.')
173 tester("ntpath.normpath('/')", '\\')
174 tester("ntpath.normpath('c:/')", 'c:\\')
175 tester("ntpath.normpath('/../.././..')", '\\')
176 tester("ntpath.normpath('c:/../../..')", 'c:\\')
177 tester("ntpath.normpath('../.././..')", r'..\..\..')
178 tester("ntpath.normpath('K:../.././..')", r'K:..\..\..')
179 tester("ntpath.normpath('C:////a/b')", r'C:\a\b')
180 tester("ntpath.normpath('//machine/share//a/b')", r'\\machine\share\a\b')
182 tester("ntpath.normpath('\\\\.\\NUL')", r'\\.\NUL')
183 tester("ntpath.normpath('\\\\?\\D:/XY\\Z')", r'\\?\D:/XY\Z')
191 tester('ntpath.expandvars("foo")', "foo")
192 tester('ntpath.expandvars("$foo bar")', "bar bar")
193 tester('ntpath.expandvars("${foo}bar")', "barbar")
194 tester('ntpath.expandvars("$[foo]bar")', "$[foo]bar")
195 tester('ntpath.expandvars("$bar bar")', "$bar bar")
196 tester('ntpath.expandvars("$?bar")', "$?bar")
197 tester('ntpath.expandvars("$foo}bar")', "bar}bar")
198 tester('ntpath.expandvars("${foo")', "${foo")
199 tester('ntpath.expandvars("${{foo}}")', "baz1}")
200 tester('ntpath.expandvars("$foo$foo")', "barbar")
201 tester('ntpath.expandvars("$bar$bar")', "$bar$bar")
202 tester('ntpath.expandvars("%foo% bar")', "bar bar")
203 tester('ntpath.expandvars("%foo%bar")', "barbar")
204 tester('ntpath.expandvars("%foo%%foo%")', "barbar")
205 tester('ntpath.expandvars("%%foo%%foo%foo%")', "%foo%foobar")
206 tester('ntpath.expandvars("%?bar%")', "%?bar%")
207 tester('ntpath.expandvars("%foo%%bar")', "bar%bar")
208 tester('ntpath.expandvars("\'%foo%\'%bar")', "\'%foo%\'%bar")
209 tester('ntpath.expandvars("bar\'%foo%")', "bar\'%foo%")
236 tester('ntpath.expanduser("test")', 'test')
240 tester('ntpath.expanduser("~test")', '~test')
244 tester('ntpath.expanduser("~test")', 'C:\\eric\\test')
245 tester('ntpath.expanduser("~")', 'C:\\eric\\idle')
248 tester('ntpath.expanduser("~test")', 'eric\\test')
249 tester('ntpath.expanduser("~")', 'eric\\idle')
253 tester('ntpath.expanduser("~test")', 'C:\\eric\\test')
254 tester('ntpath.expanduser("~")', 'C:\\eric\\idle')
258 tester('ntpath.expanduser("~test")', 'C:\\idle\\test')
259 tester('ntpath.expanduser("~")', 'C:\\idle\\eric')
261 tester('ntpath.expanduser("~test\\foo\\bar")',
263 tester('ntpath.expanduser("~test/foo/bar")',
265 tester('ntpath.expanduser("~\\foo\\bar")',
267 tester('ntpath.expanduser("~/foo/bar")',
283 tester('ntpath.abspath("C:\\")', "C:\\")
286 tester('ntpath.relpath("a")', 'a')
287 tester('ntpath.relpath(os.path.abspath("a"))', 'a')
288 tester('ntpath.relpath("a/b")', 'a\\b')
289 tester('ntpath.relpath("../a/b")', '..\\a\\b')
292 tester('ntpath.relpath("a", "../b")', '..\\'+currentdir+'\\a')
293 tester('ntpath.relpath("a/b", "../c")', '..\\'+currentdir+'\\a\\b')
294 tester('ntpath.relpath("a", "b/c")', '..\\..\\a')
295 tester('ntpath.relpath("//conky/mountpoint/a", "//conky/mountpoint/b/c")', '..\\..\\a')
296 tester('ntpath.relpath("a", "a")', '.')
297 tester('ntpath.relpath("/foo/bar/bat", "/x/y/z")', '..\\..\\..\\foo\\bar\\bat')
298 tester('ntpath.relpath("/foo/bar/bat", "/foo/bar")', 'bat')
299 tester('ntpath.relpath("/foo/bar/bat", "/")', 'foo\\bar\\bat')
300 tester('ntpath.relpath("/", "/foo/bar/bat")', '..\\..\\..')
301 tester('ntpath.relpath("/foo/bar/bat", "/x")', '..\\foo\\bar\\bat')
302 tester('ntpath.relpath("/x", "/foo/bar/bat")', '..\\..\\..\\x')
303 tester('ntpath.relpath("/", "/")', '.')
304 tester('ntpath.relpath("/a", "/a")', '.')
305 tester('ntpath.relpath("/a/b", "/a/b")', '.')
306 tester('ntpath.relpath("c:/foo", "C:/FOO")', '.')