diff options
author | Ronald Oussoren <ronaldoussoren@mac.com> | 2010-02-07 11:38:28 +0000 |
---|---|---|
committer | Ronald Oussoren <ronaldoussoren@mac.com> | 2010-02-07 11:38:28 +0000 |
commit | ab3f5cbabd1a8ed8ac3b0e595f31826d5f320a6a (patch) | |
tree | c077db8ddb5e391fd55932b69d5787b9bd37bba6 /Lib/test/test_macostools.py | |
parent | b0eb4d3eb1e51bc54f5d33eacee2653ce5322f1a (diff) | |
download | cpython-git-ab3f5cbabd1a8ed8ac3b0e595f31826d5f320a6a.tar.gz |
A number of APIs in macostools cannot work in 64-bit mode because they
use Carbon APIs that aren't available there.
This patch disables tests for the affected entrypoints in macostools and
mentions this in the documentation.
In theory it is possible to replace the implementation by code that does
work in 64-bit mode, but that would require further updates to the Carbon
wrappers because the modern APIs aren't wrapped properly.
Diffstat (limited to 'Lib/test/test_macostools.py')
-rw-r--r-- | Lib/test/test_macostools.py | 60 |
1 files changed, 31 insertions, 29 deletions
diff --git a/Lib/test/test_macostools.py b/Lib/test/test_macostools.py index b84ad7202e..642a584c1d 100644 --- a/Lib/test/test_macostools.py +++ b/Lib/test/test_macostools.py @@ -59,37 +59,39 @@ class TestMacostools(unittest.TestCase): DeprecationWarning) macostools.touched(test_support.TESTFN) - def test_copy(self): - try: - os.unlink(TESTFN2) - except: - pass - macostools.copy(test_support.TESTFN, TESTFN2) - self.assertEqual(self.compareData(), '') + if sys.maxint < 2**32: + def test_copy(self): + try: + os.unlink(TESTFN2) + except: + pass + macostools.copy(test_support.TESTFN, TESTFN2) + self.assertEqual(self.compareData(), '') - def test_mkalias(self): - try: - os.unlink(TESTFN2) - except: - pass - macostools.mkalias(test_support.TESTFN, TESTFN2) - fss, _, _ = Carbon.File.ResolveAliasFile(TESTFN2, 0) - self.assertEqual(fss.as_pathname(), os.path.realpath(test_support.TESTFN)) + if sys.maxint < 2**32: + def test_mkalias(self): + try: + os.unlink(TESTFN2) + except: + pass + macostools.mkalias(test_support.TESTFN, TESTFN2) + fss, _, _ = Carbon.File.ResolveAliasFile(TESTFN2, 0) + self.assertEqual(fss.as_pathname(), os.path.realpath(test_support.TESTFN)) - def test_mkalias_relative(self): - try: - os.unlink(TESTFN2) - except: - pass - # If the directory doesn't exist, then chances are this is a new - # install of Python so don't create it since the user might end up - # running ``sudo make install`` and creating the directory here won't - # leave it with the proper permissions. - if not os.path.exists(sys.prefix): - return - macostools.mkalias(test_support.TESTFN, TESTFN2, sys.prefix) - fss, _, _ = Carbon.File.ResolveAliasFile(TESTFN2, 0) - self.assertEqual(fss.as_pathname(), os.path.realpath(test_support.TESTFN)) + def test_mkalias_relative(self): + try: + os.unlink(TESTFN2) + except: + pass + # If the directory doesn't exist, then chances are this is a new + # install of Python so don't create it since the user might end up + # running ``sudo make install`` and creating the directory here won't + # leave it with the proper permissions. + if not os.path.exists(sys.prefix): + return + macostools.mkalias(test_support.TESTFN, TESTFN2, sys.prefix) + fss, _, _ = Carbon.File.ResolveAliasFile(TESTFN2, 0) + self.assertEqual(fss.as_pathname(), os.path.realpath(test_support.TESTFN)) def test_main(): |