Issue 7041: test_macostools fails on os x 10.6 (original) (raw)
test_macostools test_copy (test.test_macostools.TestMacostools) ... ERROR test_mkalias (test.test_macostools.TestMacostools) ... ERROR test_mkalias_relative (test.test_macostools.TestMacostools) ... ERROR test_touched (test.test_macostools.TestMacostools) ... ok
====================================================================== ERROR: test_copy (test.test_macostools.TestMacostools)
Traceback (most recent call last): File "/Users/jan/src/python26/Lib/test/test_macostools.py", line 65, in test_copy macostools.copy(test_support.TESTFN, TESTFN2) File "/Users/jan/src/python26/Lib/plat-mac/macostools.py", line 114, in copy srcfss = File.FSSpec(src) AttributeError: 'module' object has no attribute 'FSSpec'
====================================================================== ERROR: test_mkalias (test.test_macostools.TestMacostools)
Traceback (most recent call last): File "/Users/jan/src/python26/Lib/test/test_macostools.py", line 73, in test_mkalias macostools.mkalias(test_support.TESTFN, TESTFN2) File "/Users/jan/src/python26/Lib/plat-mac/macostools.py", line 46, in mkalias dstfsr, dstfss = Res.FSCreateResourceFile(dstdirfsr, unicode(dstname), AttributeError: 'module' object has no attribute 'FSCreateResourceFile'
====================================================================== ERROR: test_mkalias_relative (test.test_macostools.TestMacostools)
Traceback (most recent call last): File "/Users/jan/src/python26/Lib/test/test_macostools.py", line 88, in test_mkalias_relative macostools.mkalias(test_support.TESTFN, TESTFN2, sys.prefix) File "/Users/jan/src/python26/Lib/plat-mac/macostools.py", line 46, in mkalias dstfsr, dstfss = Res.FSCreateResourceFile(dstdirfsr, unicode(dstname), AttributeError: 'module' object has no attribute 'FSCreateResourceFile'
Ran 4 tests in 0.006s
FAILED (errors=3) test test_macostools failed -- errors occurred; run in verbose mode for details 1 test failed: test_macostools
This test works for me using the 2.6.3 installer which is 32-bit only.
It will fail, though, on a 64-bit build since Apple does not supply 64-bit versions of the Carbon frameworks used by these modules. That's why they are deprecated and have been removed in python 3. You can see the same failure using Apple's 64-bit python 2.6 in 10.6. You'll also see it on 10.5 with 64-bit.