Commits

Ronald Oussoren  committed 828668d

avoid test failure

  • Participants
  • Parent commits adbb351

Comments (0)

Files changed (1)

File pyobjc-framework-DictionaryServices/PyObjCTest/test_dictionaryservices.py

 
     
     def testFunctions(self):
-        r = DCSGetTermRangeInString(None, b"the hello world program".decode('latin1'), 5)
+        txt = b"the hello world program".decode('latin1')
+        r = DCSGetTermRangeInString(None, txt, 5)
         self.assertIsInstance(r, CFRange)
         self.assertEqual(r, (4, 5))
 
-        r = DCSCopyTextDefinition(None, b"program".decode('latin1'), r)
-        self.assertIsInstance(r, unicode)
+        r = DCSCopyTextDefinition(None, txt, r)
+        self.assertIsInstance(r, (unicode, type(None)))
 
         v = DCSDictionaryGetTypeID()
         self.assertIsInstance(v, (int, long))