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.
........
This commit is contained in:
Florent Xicluna 2010-03-08 12:24:53 +00:00
parent 961683ac0f
commit c9c79784cf
5 changed files with 211 additions and 230 deletions

View file

@ -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__":