summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorRonald Oussoren <ronaldoussoren@mac.com>2010-02-07 11:39:16 (GMT)
committerRonald Oussoren <ronaldoussoren@mac.com>2010-02-07 11:39:16 (GMT)
commit4da7d7822a1a99b9bd30cefe31c2496b7fd1e604 (patch)
tree7829cab85fa159994c04e341392b434cfe0e634f /Lib
parent6ff97f7e21af3ab4287f77f73fd17e4a9baa03a3 (diff)
downloadcpython-4da7d7822a1a99b9bd30cefe31c2496b7fd1e604.zip
cpython-4da7d7822a1a99b9bd30cefe31c2496b7fd1e604.tar.gz
cpython-4da7d7822a1a99b9bd30cefe31c2496b7fd1e604.tar.bz2
Merged revisions 78061 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r78061 | ronald.oussoren | 2010-02-07 12:38:28 +0100 (Sun, 07 Feb 2010) | 10 lines 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')
-rw-r--r--Lib/test/test_macostools.py60
1 files changed, 31 insertions, 29 deletions
diff --git a/Lib/test/test_macostools.py b/Lib/test/test_macostools.py
index 5c83d28..ac965ac 100644
--- a/Lib/test/test_macostools.py
+++ b/Lib/test/test_macostools.py
@@ -57,37 +57,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():