summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_ntpath.py
diff options
context:
space:
mode:
authorFlorent Xicluna <florent.xicluna@gmail.com>2010-03-08 12:24:53 (GMT)
committerFlorent Xicluna <florent.xicluna@gmail.com>2010-03-08 12:24:53 (GMT)
commitc9c79784cf675819981e54b9c64a9ec114aff994 (patch)
tree00124eb960e0a9847c12708a9ba52c2a34fc069c /Lib/test/test_ntpath.py
parent961683ac0f37de933ed15ccc60a9eee1a2fbcefc (diff)
downloadcpython-c9c79784cf675819981e54b9c64a9ec114aff994.zip
cpython-c9c79784cf675819981e54b9c64a9ec114aff994.tar.gz
cpython-c9c79784cf675819981e54b9c64a9ec114aff994.tar.bz2
Merged revisions 78734-78735 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r78734 | florent.xicluna | 2010-03-06 19:07:18 +0100 (sam, 06 mar 2010) | 2 lines Create test_genericpath.CommonTest and reuse it to test other path modules. ........ r78735 | florent.xicluna | 2010-03-06 19:52:52 +0100 (sam, 06 mar 2010) | 2 lines Minor tweaking of previous r78734, and add a NEWS entry. ........
Diffstat (limited to 'Lib/test/test_ntpath.py')
-rw-r--r--Lib/test/test_ntpath.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/Lib/test/test_ntpath.py b/Lib/test/test_ntpath.py
index 94a7d9e..c83b45f 100644
--- a/Lib/test/test_ntpath.py
+++ b/Lib/test/test_ntpath.py
@@ -1,7 +1,7 @@
import ntpath
import os
from test.support import verbose, TestFailed
-import test.support as support
+from test import support, test_genericpath
import unittest
@@ -174,7 +174,6 @@ class TestNtpath(unittest.TestCase):
tester("ntpath.normpath('C:////a/b')", r'C:\a\b')
tester("ntpath.normpath('//machine/share//a/b')", r'\\machine\share\a\b')
-
def test_expandvars(self):
with support.EnvironmentVarGuard() as env:
env.clear()
@@ -236,8 +235,13 @@ class TestNtpath(unittest.TestCase):
tester('ntpath.relpath("/a/b", "/a/b")', '.')
+class NtCommonTest(test_genericpath.CommonTest):
+ pathmodule = ntpath
+ attributes = ['relpath', 'splitunc']
+
+
def test_main():
- support.run_unittest(TestNtpath)
+ support.run_unittest(TestNtpath, NtCommonTest)
if __name__ == "__main__":