コード例 #1
0
ファイル: test_nshost.py プロジェクト: aosm/pyobjc
 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])
コード例 #2
0
ファイル: test_nshost.py プロジェクト: happylaodu/osx-10.9
 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])
コード例 #3
0
ファイル: test_nshost.py プロジェクト: BMXE/music-player
 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])
コード例 #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])