diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2004-06-06 20:09:49 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2004-06-06 20:09:49 (GMT) |
commit | 7b0a5057afaadab77aa20f87681edd89e327ea3c (patch) | |
tree | fe07ec4e5851f13315fb7b7e38a536bb3acc771b /Lib | |
parent | c3cd9df95ad93b4af010e04396d6e4eca1fffcdf (diff) | |
download | cpython-7b0a5057afaadab77aa20f87681edd89e327ea3c.zip cpython-7b0a5057afaadab77aa20f87681edd89e327ea3c.tar.gz cpython-7b0a5057afaadab77aa20f87681edd89e327ea3c.tar.bz2 |
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).
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_multibytecodec_support.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Lib/test/test_multibytecodec_support.py b/Lib/test/test_multibytecodec_support.py index 77033cd..6c503bf 100644 --- a/Lib/test/test_multibytecodec_support.py +++ b/Lib/test/test_multibytecodec_support.py @@ -164,8 +164,13 @@ class TestBase_Mapping(unittest.TestCase): def __init__(self, *args, **kw): unittest.TestCase.__init__(self, *args, **kw) if not os.path.exists(self.mapfilename): - raise test_support.TestSkipped('%s not found, download from %s' % - (self.mapfilename, self.mapfileurl)) + parent = os.path.join(os.pardir, self.mapfilename) + 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): unichrs = lambda s: u''.join(map(unichr, map(eval, s.split('+')))) |