Esempio n. 1
0
 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')
Esempio n. 2
0
 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')
Esempio n. 3
0
 def testCreation2(self):
     o = NSHost.hostWithName_(u'localhost')
     l = list(o.addresses())
     l.sort()
     #self.assert_(l in ([u'127.0.0.1', u'::1'], [u'127.0.0.1']))
     self.assertEqual(o.address(), o.addresses()[0])
Esempio n. 4
0
 def testCreation2(self):
     o = NSHost.hostWithName_(b"localhost".decode("ascii"))
     l = list(o.addresses())
     l.sort()
     # self.assert_(l in ([b'127.0.0.1'.decode('ascii'), b'::1'.decode('ascii')], [b'127.0.0.1'.decode('ascii')]))
     self.assertEqual(o.address(), o.addresses()[0])
Esempio n. 5
0
 def testCreation2(self):
     o = NSHost.hostWithName_(u'localhost')
     l = list(o.addresses())
     l.sort()
     #self.assert_(l in ([u'127.0.0.1', u'::1'], [u'127.0.0.1']))
     self.assertEquals(o.address(), o.addresses()[0])
Esempio n. 6
0
 def testCreation2(self):
     o = NSHost.hostWithName_(b'localhost'.decode('ascii'))
     l = list(o.addresses())
     l.sort()
     #self.assert_(l in ([b'127.0.0.1'.decode('ascii'), b'::1'.decode('ascii')], [b'127.0.0.1'.decode('ascii')]))
     self.assertEqual(o.address(), o.addresses()[0])