Guido van Rossum | ead9d8d | 1999-02-03 17:21:21 +0000 | [diff] [blame] | 1 | import ntpath |
Mark Hammond | 673c6cf | 2000-08-14 06:21:26 +0000 | [diff] [blame] | 2 | import os |
Serhiy Storchaka | 2ac9d31 | 2014-02-19 23:27:37 +0200 | [diff] [blame^] | 3 | import sys |
Georg Brandl | a4f46e1 | 2010-02-07 17:03:15 +0000 | [diff] [blame] | 4 | from test.test_support import TestFailed |
Florent Xicluna | dc1531c | 2010-03-06 18:07:18 +0000 | [diff] [blame] | 5 | from test import test_support, test_genericpath |
Jerry Seutter | fc7b3e3 | 2008-03-26 05:58:14 +0000 | [diff] [blame] | 6 | import unittest |
Guido van Rossum | ead9d8d | 1999-02-03 17:21:21 +0000 | [diff] [blame] | 7 | |
Serhiy Storchaka | 2ac9d31 | 2014-02-19 23:27:37 +0200 | [diff] [blame^] | 8 | def tester0(fn, wantResult): |
| 9 | gotResult = eval(fn) |
| 10 | if wantResult != gotResult: |
| 11 | raise TestFailed, "%s should return: %r but returned: %r" \ |
| 12 | %(fn, wantResult, gotResult) |
Guido van Rossum | ead9d8d | 1999-02-03 17:21:21 +0000 | [diff] [blame] | 13 | |
| 14 | def tester(fn, wantResult): |
Eric S. Raymond | fc170b1 | 2001-02-09 11:51:27 +0000 | [diff] [blame] | 15 | fn = fn.replace("\\", "\\\\") |
Serhiy Storchaka | 2ac9d31 | 2014-02-19 23:27:37 +0200 | [diff] [blame^] | 16 | tester0(fn, wantResult) |
Tim Peters | 6578dc9 | 2002-12-24 18:31:27 +0000 | [diff] [blame] | 17 | |
Guido van Rossum | ead9d8d | 1999-02-03 17:21:21 +0000 | [diff] [blame] | 18 | |
Jerry Seutter | fc7b3e3 | 2008-03-26 05:58:14 +0000 | [diff] [blame] | 19 | class TestNtpath(unittest.TestCase): |
| 20 | def test_splitext(self): |
| 21 | tester('ntpath.splitext("foo.ext")', ('foo', '.ext')) |
| 22 | tester('ntpath.splitext("/foo/foo.ext")', ('/foo/foo', '.ext')) |
| 23 | tester('ntpath.splitext(".ext")', ('.ext', '')) |
| 24 | tester('ntpath.splitext("\\foo.ext\\foo")', ('\\foo.ext\\foo', '')) |
| 25 | tester('ntpath.splitext("foo.ext\\")', ('foo.ext\\', '')) |
| 26 | tester('ntpath.splitext("")', ('', '')) |
| 27 | tester('ntpath.splitext("foo.bar.ext")', ('foo.bar', '.ext')) |
| 28 | tester('ntpath.splitext("xx/foo.bar.ext")', ('xx/foo.bar', '.ext')) |
| 29 | tester('ntpath.splitext("xx\\foo.bar.ext")', ('xx\\foo.bar', '.ext')) |
| 30 | tester('ntpath.splitext("c:a/b\\c.d")', ('c:a/b\\c', '.d')) |
Guido van Rossum | ead9d8d | 1999-02-03 17:21:21 +0000 | [diff] [blame] | 31 | |
Jerry Seutter | fc7b3e3 | 2008-03-26 05:58:14 +0000 | [diff] [blame] | 32 | def test_splitdrive(self): |
| 33 | tester('ntpath.splitdrive("c:\\foo\\bar")', |
| 34 | ('c:', '\\foo\\bar')) |
| 35 | tester('ntpath.splitdrive("c:/foo/bar")', |
| 36 | ('c:', '/foo/bar')) |
Guido van Rossum | ead9d8d | 1999-02-03 17:21:21 +0000 | [diff] [blame] | 37 | |
Jerry Seutter | fc7b3e3 | 2008-03-26 05:58:14 +0000 | [diff] [blame] | 38 | def test_splitunc(self): |
Serhiy Storchaka | dd5a46c | 2013-12-16 15:15:29 +0200 | [diff] [blame] | 39 | tester('ntpath.splitunc("c:\\foo\\bar")', |
| 40 | ('', 'c:\\foo\\bar')) |
| 41 | tester('ntpath.splitunc("c:/foo/bar")', |
| 42 | ('', 'c:/foo/bar')) |
Jerry Seutter | fc7b3e3 | 2008-03-26 05:58:14 +0000 | [diff] [blame] | 43 | tester('ntpath.splitunc("\\\\conky\\mountpoint\\foo\\bar")', |
| 44 | ('\\\\conky\\mountpoint', '\\foo\\bar')) |
| 45 | tester('ntpath.splitunc("//conky/mountpoint/foo/bar")', |
| 46 | ('//conky/mountpoint', '/foo/bar')) |
Serhiy Storchaka | dd5a46c | 2013-12-16 15:15:29 +0200 | [diff] [blame] | 47 | tester('ntpath.splitunc("\\\\\\conky\\mountpoint\\foo\\bar")', |
| 48 | ('', '\\\\\\conky\\mountpoint\\foo\\bar')) |
| 49 | tester('ntpath.splitunc("///conky/mountpoint/foo/bar")', |
| 50 | ('', '///conky/mountpoint/foo/bar')) |
| 51 | tester('ntpath.splitunc("\\\\conky\\\\mountpoint\\foo\\bar")', |
| 52 | ('', '\\\\conky\\\\mountpoint\\foo\\bar')) |
| 53 | tester('ntpath.splitunc("//conky//mountpoint/foo/bar")', |
| 54 | ('', '//conky//mountpoint/foo/bar')) |
| 55 | self.assertEqual(ntpath.splitunc(u'//conky/MOUNTPO\u0130NT/foo/bar'), |
| 56 | (u'//conky/MOUNTPO\u0130NT', u'/foo/bar')) |
Guido van Rossum | ead9d8d | 1999-02-03 17:21:21 +0000 | [diff] [blame] | 57 | |
Jerry Seutter | fc7b3e3 | 2008-03-26 05:58:14 +0000 | [diff] [blame] | 58 | def test_split(self): |
| 59 | tester('ntpath.split("c:\\foo\\bar")', ('c:\\foo', 'bar')) |
| 60 | tester('ntpath.split("\\\\conky\\mountpoint\\foo\\bar")', |
| 61 | ('\\\\conky\\mountpoint\\foo', 'bar')) |
Guido van Rossum | ead9d8d | 1999-02-03 17:21:21 +0000 | [diff] [blame] | 62 | |
Jerry Seutter | fc7b3e3 | 2008-03-26 05:58:14 +0000 | [diff] [blame] | 63 | tester('ntpath.split("c:\\")', ('c:\\', '')) |
| 64 | tester('ntpath.split("\\\\conky\\mountpoint\\")', |
| 65 | ('\\\\conky\\mountpoint', '')) |
Guido van Rossum | ead9d8d | 1999-02-03 17:21:21 +0000 | [diff] [blame] | 66 | |
Jerry Seutter | fc7b3e3 | 2008-03-26 05:58:14 +0000 | [diff] [blame] | 67 | tester('ntpath.split("c:/")', ('c:/', '')) |
| 68 | tester('ntpath.split("//conky/mountpoint/")', ('//conky/mountpoint', '')) |
Mark Hammond | 673c6cf | 2000-08-14 06:21:26 +0000 | [diff] [blame] | 69 | |
Jerry Seutter | fc7b3e3 | 2008-03-26 05:58:14 +0000 | [diff] [blame] | 70 | def test_isabs(self): |
| 71 | tester('ntpath.isabs("c:\\")', 1) |
| 72 | tester('ntpath.isabs("\\\\conky\\mountpoint\\")', 1) |
| 73 | tester('ntpath.isabs("\\foo")', 1) |
| 74 | tester('ntpath.isabs("\\foo\\bar")', 1) |
Tim Peters | d4f7f60 | 2001-07-19 19:11:41 +0000 | [diff] [blame] | 75 | |
Jerry Seutter | fc7b3e3 | 2008-03-26 05:58:14 +0000 | [diff] [blame] | 76 | def test_commonprefix(self): |
| 77 | tester('ntpath.commonprefix(["/home/swenson/spam", "/home/swen/spam"])', |
| 78 | "/home/swen") |
| 79 | tester('ntpath.commonprefix(["\\home\\swen\\spam", "\\home\\swen\\eggs"])', |
| 80 | "\\home\\swen\\") |
| 81 | tester('ntpath.commonprefix(["/home/swen/spam", "/home/swen/spam"])', |
| 82 | "/home/swen/spam") |
Tim Peters | 6a3e5f1 | 2001-11-05 21:25:02 +0000 | [diff] [blame] | 83 | |
Jerry Seutter | fc7b3e3 | 2008-03-26 05:58:14 +0000 | [diff] [blame] | 84 | def test_join(self): |
| 85 | tester('ntpath.join("")', '') |
| 86 | tester('ntpath.join("", "", "")', '') |
| 87 | tester('ntpath.join("a")', 'a') |
| 88 | tester('ntpath.join("/a")', '/a') |
| 89 | tester('ntpath.join("\\a")', '\\a') |
| 90 | tester('ntpath.join("a:")', 'a:') |
Jerry Seutter | fc7b3e3 | 2008-03-26 05:58:14 +0000 | [diff] [blame] | 91 | tester('ntpath.join("a:", "\\b")', 'a:\\b') |
Jerry Seutter | fc7b3e3 | 2008-03-26 05:58:14 +0000 | [diff] [blame] | 92 | tester('ntpath.join("a", "\\b")', '\\b') |
| 93 | tester('ntpath.join("a", "b", "c")', 'a\\b\\c') |
| 94 | tester('ntpath.join("a\\", "b", "c")', 'a\\b\\c') |
| 95 | tester('ntpath.join("a", "b\\", "c")', 'a\\b\\c') |
| 96 | tester('ntpath.join("a", "b", "\\c")', '\\c') |
| 97 | tester('ntpath.join("d:\\", "\\pleep")', 'd:\\pleep') |
| 98 | tester('ntpath.join("d:\\", "a", "b")', 'd:\\a\\b') |
Tim Peters | 54a14a3 | 2001-08-30 22:05:26 +0000 | [diff] [blame] | 99 | |
Jerry Seutter | fc7b3e3 | 2008-03-26 05:58:14 +0000 | [diff] [blame] | 100 | tester("ntpath.join('', 'a')", 'a') |
| 101 | tester("ntpath.join('', '', '', '', 'a')", 'a') |
| 102 | tester("ntpath.join('a', '')", 'a\\') |
| 103 | tester("ntpath.join('a', '', '', '', '')", 'a\\') |
| 104 | tester("ntpath.join('a\\', '')", 'a\\') |
| 105 | tester("ntpath.join('a\\', '', '', '', '')", 'a\\') |
Serhiy Storchaka | 31f5121 | 2014-01-27 23:14:51 +0200 | [diff] [blame] | 106 | tester("ntpath.join('a/', '')", 'a/') |
| 107 | |
| 108 | tester("ntpath.join('a/b', 'x/y')", 'a/b\\x/y') |
| 109 | tester("ntpath.join('/a/b', 'x/y')", '/a/b\\x/y') |
| 110 | tester("ntpath.join('/a/b/', 'x/y')", '/a/b/x/y') |
| 111 | tester("ntpath.join('c:', 'x/y')", 'c:x/y') |
| 112 | tester("ntpath.join('c:a/b', 'x/y')", 'c:a/b\\x/y') |
| 113 | tester("ntpath.join('c:a/b/', 'x/y')", 'c:a/b/x/y') |
| 114 | tester("ntpath.join('c:/', 'x/y')", 'c:/x/y') |
| 115 | tester("ntpath.join('c:/a/b', 'x/y')", 'c:/a/b\\x/y') |
| 116 | tester("ntpath.join('c:/a/b/', 'x/y')", 'c:/a/b/x/y') |
| 117 | #tester("ntpath.join('//computer/share', 'x/y')", '//computer/share\\x/y') |
| 118 | #tester("ntpath.join('//computer/share/', 'x/y')", '//computer/share/x/y') |
| 119 | #tester("ntpath.join('//computer/share/a/b', 'x/y')", '//computer/share/a/b\\x/y') |
| 120 | |
| 121 | tester("ntpath.join('a/b', '/x/y')", '/x/y') |
| 122 | tester("ntpath.join('/a/b', '/x/y')", '/x/y') |
| 123 | tester("ntpath.join('c:', '/x/y')", 'c:/x/y') |
| 124 | tester("ntpath.join('c:a/b', '/x/y')", 'c:/x/y') |
| 125 | tester("ntpath.join('c:/', '/x/y')", 'c:/x/y') |
| 126 | tester("ntpath.join('c:/a/b', '/x/y')", 'c:/x/y') |
| 127 | #tester("ntpath.join('//computer/share', '/x/y')", '//computer/share/x/y') |
| 128 | #tester("ntpath.join('//computer/share/', '/x/y')", '//computer/share/x/y') |
| 129 | #tester("ntpath.join('//computer/share/a', '/x/y')", '//computer/share/x/y') |
| 130 | |
| 131 | tester("ntpath.join('c:', 'C:x/y')", 'C:x/y') |
| 132 | tester("ntpath.join('c:a/b', 'C:x/y')", 'C:a/b\\x/y') |
| 133 | tester("ntpath.join('c:/', 'C:x/y')", 'C:/x/y') |
| 134 | tester("ntpath.join('c:/a/b', 'C:x/y')", 'C:/a/b\\x/y') |
| 135 | |
| 136 | for x in ('', 'a/b', '/a/b', 'c:', 'c:a/b', 'c:/', 'c:/a/b'): |
| 137 | for y in ('d:', 'd:x/y', 'd:/', 'd:/x/y'): |
| 138 | tester("ntpath.join(%r, %r)" % (x, y), y) |
Tim Peters | 54a14a3 | 2001-08-30 22:05:26 +0000 | [diff] [blame] | 139 | |
Jerry Seutter | fc7b3e3 | 2008-03-26 05:58:14 +0000 | [diff] [blame] | 140 | def test_normpath(self): |
| 141 | tester("ntpath.normpath('A//////././//.//B')", r'A\B') |
| 142 | tester("ntpath.normpath('A/./B')", r'A\B') |
| 143 | tester("ntpath.normpath('A/foo/../B')", r'A\B') |
| 144 | tester("ntpath.normpath('C:A//B')", r'C:A\B') |
| 145 | tester("ntpath.normpath('D:A/./B')", r'D:A\B') |
| 146 | tester("ntpath.normpath('e:A/foo/../B')", r'e:A\B') |
Tim Peters | 54a14a3 | 2001-08-30 22:05:26 +0000 | [diff] [blame] | 147 | |
Jerry Seutter | fc7b3e3 | 2008-03-26 05:58:14 +0000 | [diff] [blame] | 148 | tester("ntpath.normpath('C:///A//B')", r'C:\A\B') |
| 149 | tester("ntpath.normpath('D:///A/./B')", r'D:\A\B') |
| 150 | tester("ntpath.normpath('e:///A/foo/../B')", r'e:\A\B') |
Sjoerd Mullender | 33a0a06 | 2007-01-16 16:42:38 +0000 | [diff] [blame] | 151 | |
Jerry Seutter | fc7b3e3 | 2008-03-26 05:58:14 +0000 | [diff] [blame] | 152 | tester("ntpath.normpath('..')", r'..') |
| 153 | tester("ntpath.normpath('.')", r'.') |
| 154 | tester("ntpath.normpath('')", r'.') |
| 155 | tester("ntpath.normpath('/')", '\\') |
| 156 | tester("ntpath.normpath('c:/')", 'c:\\') |
| 157 | tester("ntpath.normpath('/../.././..')", '\\') |
| 158 | tester("ntpath.normpath('c:/../../..')", 'c:\\') |
| 159 | tester("ntpath.normpath('../.././..')", r'..\..\..') |
| 160 | tester("ntpath.normpath('K:../.././..')", r'K:..\..\..') |
| 161 | tester("ntpath.normpath('C:////a/b')", r'C:\a\b') |
| 162 | tester("ntpath.normpath('//machine/share//a/b')", r'\\machine\share\a\b') |
Fred Drake | 5e99731 | 2002-01-15 03:46:43 +0000 | [diff] [blame] | 163 | |
Georg Brandl | e277325 | 2010-08-01 19:14:56 +0000 | [diff] [blame] | 164 | tester("ntpath.normpath('\\\\.\\NUL')", r'\\.\NUL') |
| 165 | tester("ntpath.normpath('\\\\?\\D:/XY\\Z')", r'\\?\D:/XY\Z') |
| 166 | |
Jerry Seutter | fc7b3e3 | 2008-03-26 05:58:14 +0000 | [diff] [blame] | 167 | def test_expandvars(self): |
Walter Dörwald | 6733bed | 2009-05-01 17:35:37 +0000 | [diff] [blame] | 168 | with test_support.EnvironmentVarGuard() as env: |
| 169 | env.clear() |
| 170 | env["foo"] = "bar" |
| 171 | env["{foo"] = "baz1" |
| 172 | env["{foo}"] = "baz2" |
Jerry Seutter | fc7b3e3 | 2008-03-26 05:58:14 +0000 | [diff] [blame] | 173 | tester('ntpath.expandvars("foo")', "foo") |
| 174 | tester('ntpath.expandvars("$foo bar")', "bar bar") |
| 175 | tester('ntpath.expandvars("${foo}bar")', "barbar") |
| 176 | tester('ntpath.expandvars("$[foo]bar")', "$[foo]bar") |
| 177 | tester('ntpath.expandvars("$bar bar")', "$bar bar") |
| 178 | tester('ntpath.expandvars("$?bar")', "$?bar") |
Jerry Seutter | fc7b3e3 | 2008-03-26 05:58:14 +0000 | [diff] [blame] | 179 | tester('ntpath.expandvars("$foo}bar")', "bar}bar") |
| 180 | tester('ntpath.expandvars("${foo")', "${foo") |
| 181 | tester('ntpath.expandvars("${{foo}}")', "baz1}") |
| 182 | tester('ntpath.expandvars("$foo$foo")', "barbar") |
| 183 | tester('ntpath.expandvars("$bar$bar")', "$bar$bar") |
| 184 | tester('ntpath.expandvars("%foo% bar")', "bar bar") |
| 185 | tester('ntpath.expandvars("%foo%bar")', "barbar") |
| 186 | tester('ntpath.expandvars("%foo%%foo%")', "barbar") |
| 187 | tester('ntpath.expandvars("%%foo%%foo%foo%")', "%foo%foobar") |
| 188 | tester('ntpath.expandvars("%?bar%")', "%?bar%") |
| 189 | tester('ntpath.expandvars("%foo%%bar")', "bar%bar") |
| 190 | tester('ntpath.expandvars("\'%foo%\'%bar")', "\'%foo%\'%bar") |
Collin Winter | 6f18774 | 2007-03-16 22:16:08 +0000 | [diff] [blame] | 191 | |
Serhiy Storchaka | 2ac9d31 | 2014-02-19 23:27:37 +0200 | [diff] [blame^] | 192 | @unittest.skipUnless(test_support.FS_NONASCII, 'need test_support.FS_NONASCII') |
| 193 | def test_expandvars_nonascii(self): |
| 194 | encoding = sys.getfilesystemencoding() |
| 195 | def check(value, expected): |
| 196 | tester0("ntpath.expandvars(%r)" % value, expected) |
| 197 | tester0("ntpath.expandvars(%r)" % value.decode(encoding), |
| 198 | expected.decode(encoding)) |
| 199 | with test_support.EnvironmentVarGuard() as env: |
| 200 | env.clear() |
| 201 | unonascii = test_support.FS_NONASCII |
| 202 | snonascii = unonascii.encode(encoding) |
| 203 | env['spam'] = snonascii |
| 204 | env[snonascii] = 'ham' + snonascii |
| 205 | check('$spam bar', '%s bar' % snonascii) |
| 206 | check('$%s bar' % snonascii, '$%s bar' % snonascii) |
| 207 | check('${spam}bar', '%sbar' % snonascii) |
| 208 | check('${%s}bar' % snonascii, 'ham%sbar' % snonascii) |
| 209 | check('$spam}bar', '%s}bar' % snonascii) |
| 210 | check('$%s}bar' % snonascii, '$%s}bar' % snonascii) |
| 211 | check('%spam% bar', '%s bar' % snonascii) |
| 212 | check('%{}% bar'.format(snonascii), 'ham%s bar' % snonascii) |
| 213 | check('%spam%bar', '%sbar' % snonascii) |
| 214 | check('%{}%bar'.format(snonascii), 'ham%sbar' % snonascii) |
| 215 | |
Jerry Seutter | fc7b3e3 | 2008-03-26 05:58:14 +0000 | [diff] [blame] | 216 | def test_abspath(self): |
| 217 | # ntpath.abspath() can only be used on a system with the "nt" module |
| 218 | # (reasonably), so we protect this test with "import nt". This allows |
| 219 | # the rest of the tests for the ntpath module to be run to completion |
| 220 | # on any platform, since most of the module is intended to be usable |
| 221 | # from any platform. |
Ezio Melotti | 4cc80ca | 2010-02-20 08:09:39 +0000 | [diff] [blame] | 222 | # XXX this needs more tests |
Jerry Seutter | fc7b3e3 | 2008-03-26 05:58:14 +0000 | [diff] [blame] | 223 | try: |
| 224 | import nt |
| 225 | except ImportError: |
Ezio Melotti | 4cc80ca | 2010-02-20 08:09:39 +0000 | [diff] [blame] | 226 | # check that the function is there even if we are not on Windows |
| 227 | ntpath.abspath |
Jerry Seutter | fc7b3e3 | 2008-03-26 05:58:14 +0000 | [diff] [blame] | 228 | else: |
| 229 | tester('ntpath.abspath("C:\\")', "C:\\") |
| 230 | |
| 231 | def test_relpath(self): |
| 232 | currentdir = os.path.split(os.getcwd())[-1] |
| 233 | tester('ntpath.relpath("a")', 'a') |
| 234 | tester('ntpath.relpath(os.path.abspath("a"))', 'a') |
| 235 | tester('ntpath.relpath("a/b")', 'a\\b') |
| 236 | tester('ntpath.relpath("../a/b")', '..\\a\\b') |
| 237 | tester('ntpath.relpath("a", "../b")', '..\\'+currentdir+'\\a') |
| 238 | tester('ntpath.relpath("a/b", "../c")', '..\\'+currentdir+'\\a\\b') |
| 239 | tester('ntpath.relpath("a", "b/c")', '..\\..\\a') |
| 240 | tester('ntpath.relpath("//conky/mountpoint/a", "//conky/mountpoint/b/c")', '..\\..\\a') |
| 241 | tester('ntpath.relpath("a", "a")', '.') |
Hirokazu Yamamoto | 50f7d7e | 2010-10-18 13:55:29 +0000 | [diff] [blame] | 242 | tester('ntpath.relpath("/foo/bar/bat", "/x/y/z")', '..\\..\\..\\foo\\bar\\bat') |
| 243 | tester('ntpath.relpath("/foo/bar/bat", "/foo/bar")', 'bat') |
| 244 | tester('ntpath.relpath("/foo/bar/bat", "/")', 'foo\\bar\\bat') |
| 245 | tester('ntpath.relpath("/", "/foo/bar/bat")', '..\\..\\..') |
| 246 | tester('ntpath.relpath("/foo/bar/bat", "/x")', '..\\foo\\bar\\bat') |
| 247 | tester('ntpath.relpath("/x", "/foo/bar/bat")', '..\\..\\..\\x') |
| 248 | tester('ntpath.relpath("/", "/")', '.') |
| 249 | tester('ntpath.relpath("/a", "/a")', '.') |
| 250 | tester('ntpath.relpath("/a/b", "/a/b")', '.') |
| 251 | tester('ntpath.relpath("c:/foo", "C:/FOO")', '.') |
Jerry Seutter | fc7b3e3 | 2008-03-26 05:58:14 +0000 | [diff] [blame] | 252 | |
| 253 | |
Florent Xicluna | dc1531c | 2010-03-06 18:07:18 +0000 | [diff] [blame] | 254 | class NtCommonTest(test_genericpath.CommonTest): |
Florent Xicluna | 985478d | 2010-03-06 18:52:52 +0000 | [diff] [blame] | 255 | pathmodule = ntpath |
Florent Xicluna | dc1531c | 2010-03-06 18:07:18 +0000 | [diff] [blame] | 256 | attributes = ['relpath', 'splitunc'] |
| 257 | |
| 258 | |
Jerry Seutter | fc7b3e3 | 2008-03-26 05:58:14 +0000 | [diff] [blame] | 259 | def test_main(): |
Florent Xicluna | dc1531c | 2010-03-06 18:07:18 +0000 | [diff] [blame] | 260 | test_support.run_unittest(TestNtpath, NtCommonTest) |
Jerry Seutter | fc7b3e3 | 2008-03-26 05:58:14 +0000 | [diff] [blame] | 261 | |
| 262 | |
| 263 | if __name__ == "__main__": |
| 264 | unittest.main() |