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

All Samples(22)  |  Call(22)  |  Derive(0)  |  Import(0)
Same as self.assertTrue(isinstance(obj, cls)), with a nicer
default message.

src/s/t/stravalib-0.2.2/stravalib/tests/functional/test_client.py   stravalib(Download)
        self.assertEquals('El Dorado County, CA, USA', activity.location_city)
 
        self.assertIsInstance(activity.start_latlng, attributes.LatLon)
        self.assertAlmostEquals(-120.4357631, activity.start_latlng.lon, places=2)
        self.assertAlmostEquals(38.74263759999999, activity.start_latlng.lat, places=2)
 
        self.assertIsInstance(activity.map, model.Map)
 
        self.assertIsInstance(activity.athlete, model.Athlete)
        print zones
        self.assertEquals(1, len(zones))
        self.assertIsInstance(zones[0], model.PaceActivityZone)
 
        # Indirectly
        print athlete.shoes
 
        self.assertIsInstance(athlete.shoes[0], model.Shoe)
        self.assertIsInstance(athlete.clubs[0], model.Club)
        self.assertIsInstance(athlete.bikes[0], model.Bike)

src/s/t/stravalib-HEAD/stravalib/tests/functional/test_client.py   stravalib(Download)
        self.assertEquals('El Dorado County, CA, USA', activity.location_city)
 
        self.assertIsInstance(activity.start_latlng, attributes.LatLon)
        self.assertAlmostEquals(-120.4357631, activity.start_latlng.lon, places=2)
        self.assertAlmostEquals(38.74263759999999, activity.start_latlng.lat, places=2)
 
        self.assertIsInstance(activity.map, model.Map)
 
        self.assertIsInstance(activity.athlete, model.Athlete)
        print zones
        self.assertEquals(1, len(zones))
        self.assertIsInstance(zones[0], model.PaceActivityZone)
 
        # Indirectly
        print athlete.shoes
 
        self.assertIsInstance(athlete.shoes[0], model.Shoe)
        self.assertIsInstance(athlete.clubs[0], model.Club)
        self.assertIsInstance(athlete.bikes[0], model.Bike)