Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(0)  |  Call(0)  |  Derive(0)  |  Import(0)
dict() -> new empty dictionary
dict(mapping) -> new dictionary initialized from a mapping object's
    (key, value) pairs
dict(iterable) -> new dictionary initialized as if via:
    d = {}
    for k, v in iterable:
        d[k] = v
dict(**kwargs) -> new dictionary initialized with the name=value pairs
    in the keyword argument list.  For example:  dict(one=1, two=2)

src/p/y/py2FaceR-0.1.1/src/py2facer/tests/picasa.py   py2FaceR(Download)
    def testParseSimple(self):
        self.contact_parser.parse_xml(open(tests.TESTFILES['contacts']))
        self.contact_parser['contact_hash']
 
    def testSetContact(self):
        self.contact_parser.parse_xml(open(tests.TESTFILES['contacts']))
    def testParse(self):
        parsed = self.iniparser._parse_ini(open(tests.TESTFILES['ini']), base_path=os.path.dirname(tests.TESTFILES['ini']))
        self.assertEqual(len(parsed['test.jpg']), 2)
        self.assertEqual(len(parsed['007.jpg']), 1)
 
    def testAddFaces(self):
        img = image.Image(image_path=tests.TESTFILES['img'])

src/p/y/py2FaceR-0.1.1/src/py2facer/tests/image.py   py2FaceR(Download)
    def testBasic(self):
        picasacontact = picasa.Contact('bob', ['bob@gmail.com'], 'simplehash')
        img = image.Image(image_path=tests.TESTFILES['img'])
        img.add_face(google_id=picasacontact)
        self.assertEqual(len(img.people), 1)
    def testKnownImage(self):
        img = image.Image(image_path=tests.TESTFILES['img'])
        self.assertEqual(img.height, 362)
        self.assertEqual(img.width, 585)
 
class TestContainedPerson(unittest.TestCase):
    def setUp(self):
        self.img = image.Image(image_path=tests.TESTFILES['img'])

src/p/y/py2FaceR-0.1.1/src/py2facer/tests/flickr.py   py2FaceR(Download)
    def setUp(self):
        self.IMAGES = [image.Image(tests.TESTFILES['img']), 
                       image.Image('%s/testdata/007.JPG' % tests.BASEPATH),
                       image.Image('%s/testdata/Nobody.jpg' % tests.BASEPATH)]
        tests.delOldDb()