mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
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:
parent
961683ac0f
commit
c9c79784cf
5 changed files with 211 additions and 230 deletions
|
@ -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__":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue