Commits

Anonymous committed 4bec7c0

Added a unit test that demonstrates an Intel specific crasher. The same test passes on PPC.

Comments (0)

Files changed (2)

Doc/Xcode-Templates.html

 <li>Change your <code><span>PATH</span></code> environment variable so that the location
 of your Python interpreter appears before the others.  Since
 LaunchServices and thus Xcode is not started by your user shell,
-you will need to specify it in a plist.  See <a href="http://developer.apple.com/qa/qa2001/qa1067.html">QA1067</a>, 
-<a href="http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/Concepts/EnvironmentVars.html">Runtime Configuration: Environment Variables</a>, and the 
+you will need to specify it in a plist.  See <a href="http://developer.apple.com/qa/qa2001/qa1067.html">QA1067</a>,
+<a href="http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/Concepts/EnvironmentVars.html">Runtime Configuration: Environment Variables</a>, and the
 <a href="file:///Developer/Python/PyObjC/Examples/Plugins/EnvironmentPrefs">EnvironmentPrefs</a> System Preferences plug-in example that
 comes with PyObjC for more information about how to do this.</li>
 </ol>

Lib/AppKit/test/test_nsimage.py

+import unittest
+import AppKit
+
+class TestNSImage (unittest.TestCase):
+    def test_getTIFFCompressionTypes(self):
+        # comes straight from ReSTedit.  Works on PPC, not on Intel (as of r1791)
+        ws = AppKit.NSWorkspace.sharedWorkspace()
+        txtIcon = ws.iconForFileType_("txt")
+        txtIcon.setSize_( (16,16) )
+        htmlIcon = ws.iconForFileType_("html")
+        htmlIcon.setSize_( (16,16) )
+        
+        comboIcon = AppKit.NSImage.alloc().initWithSize_( (16,16) )
+        comboIcon.lockFocus()
+        txtIcon.compositeToPoint_fromRect_operation_((0,0), ((0,0),(8,16)), AppKit.NSCompositeCopy)
+        htmlIcon.compositeToPoint_fromRect_operation_((8,0), ((8,0),(8,16)), AppKit.NSCompositeCopy)
+        comboIcon.unlockFocus()
+
+if __name__ == "__main__":
+    unittest.main()