コード例 #1
0
ファイル: test_nshost.py プロジェクト: aosm/pyobjc
 def testCreation(self):
     #
     # This gives an exception on GNUstep:
     #   NSRecursiveLockException - unlock: failed to unlock mutex
     #
     # testIndirectCreation performs the same operation from Objective-C
     # and doesn't fail. I don't see any significant differences in the
     # implementation of -hostWithAddress: and -hostWithName: yet the latter
     # does not have the problem we're seeing here.
     #
     o = NSHost.hostWithAddress_(u'127.0.0.1')
     self.assertEqual(o.addresses(), (u'127.0.0.1',))
     self.assertEqual(o.address(), u'127.0.0.1')
コード例 #2
0
ファイル: test_nshost.py プロジェクト: happylaodu/osx-10.9
 def testCreation(self):
     #
     # This gives an exception on GNUstep:
     #   NSRecursiveLockException - unlock: failed to unlock mutex
     #
     # testIndirectCreation performs the same operation from Objective-C
     # and doesn't fail. I don't see any significant differences in the
     # implementation of -hostWithAddress: and -hostWithName: yet the latter
     # does not have the problem we're seeing here.
     #
     o = NSHost.hostWithAddress_(u'127.0.0.1')
     self.assertEquals(o.addresses(), (u'127.0.0.1', ))
     self.assertEquals(o.address(), u'127.0.0.1')