This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: test_macostools fails on os x 10.6
Type: Stage:
Components: Library (Lib), macOS, Tests Versions: Python 2.6
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: ronaldoussoren Nosy List: chuck, ned.deily, ronaldoussoren
Priority: normal Keywords:

Created on 2009-10-02 21:14 by chuck, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg93456 - (view) Author: Jan (chuck) * Date: 2009-10-02 21:14
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
msg93467 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2009-10-03 01:06
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.
msg111454 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2010-07-24 11:15
This issue was fixed in the repository a while back by disabling these tests on 64-bit systems.

As Ned notes the code uses APIs that aren't available for 64-bit processes.
History
Date User Action Args
2022-04-11 14:56:53adminsetgithub: 51290
2010-07-24 11:15:31ronaldoussorensetstatus: open -> closed

messages: + msg111454
2010-07-24 10:14:53ronaldoussorensetassignee: ronaldoussoren
components: + macOS
nosy: ronaldoussoren, ned.deily, chuck
2009-10-03 01:06:03ned.deilysetnosy: + ronaldoussoren, ned.deily
messages: + msg93467
2009-10-02 21:14:20chuckcreate