mirror of
https://github.com/python/cpython.git
synced 2025-09-01 22:47:59 +00:00
Look for the multibyte codec map files in the parent directory too
This is similar to test_normalization, so that many source trees can reference the same test file(s).
This commit is contained in:
parent
c3cd9df95a
commit
7b0a5057af
1 changed files with 7 additions and 2 deletions
|
@ -164,8 +164,13 @@ class TestBase_Mapping(unittest.TestCase):
|
||||||
def __init__(self, *args, **kw):
|
def __init__(self, *args, **kw):
|
||||||
unittest.TestCase.__init__(self, *args, **kw)
|
unittest.TestCase.__init__(self, *args, **kw)
|
||||||
if not os.path.exists(self.mapfilename):
|
if not os.path.exists(self.mapfilename):
|
||||||
raise test_support.TestSkipped('%s not found, download from %s' %
|
parent = os.path.join(os.pardir, self.mapfilename)
|
||||||
(self.mapfilename, self.mapfileurl))
|
if not os.path.exists(parent):
|
||||||
|
format = '%s not found, download from %s'
|
||||||
|
raise test_support.TestSkipped(format %
|
||||||
|
(self.mapfilename, self.mapfileurl))
|
||||||
|
else:
|
||||||
|
self.mapfilename = parent
|
||||||
|
|
||||||
def test_mapping_file(self):
|
def test_mapping_file(self):
|
||||||
unichrs = lambda s: u''.join(map(unichr, map(eval, s.split('+'))))
|
unichrs = lambda s: u''.join(map(unichr, map(eval, s.split('+'))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue