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

All Samples(20)  |  Call(20)  |  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_write.py   stravalib(Download)
        print a
 
        self.assertIsInstance(a, model.Activity)
        self.assertEquals("test_create_activity#simple", a.name)
        self.assertEquals(now, a.start_date_local)
                                        distance=uh.miles(15.2))
 
        self.assertIsInstance(a, model.Activity)
        self.assertEquals("test_update_activity#create", a.name)
 
            a = uploader.wait()
            self.assertTrue(uploader.is_complete)
            self.assertIsInstance(a, model.Activity)
            self.assertEquals("02/21/2009 Leiden, ZH, The Netherlands", a.name)
 

src/s/t/stravalib-HEAD/stravalib/tests/functional/test_client_write.py   stravalib(Download)
        print a
 
        self.assertIsInstance(a, model.Activity)
        self.assertEquals("test_create_activity#simple", a.name)
        self.assertEquals(now, a.start_date_local)
                                        distance=uh.miles(15.2))
 
        self.assertIsInstance(a, model.Activity)
        self.assertEquals("test_update_activity#create", a.name)
 
            a = uploader.wait()
            self.assertTrue(uploader.is_complete)
            self.assertIsInstance(a, model.Activity)
            self.assertEquals("02/21/2009 Leiden, ZH, The Netherlands", a.name)
 

src/s/t/stravalib-0.2.2/stravalib/tests/test_model.py   stravalib(Download)
        split.distance = 1000 # meters
        split.elevation_difference = 1000 # meters
        self.assertIsInstance(split.distance, Quantity)
        self.assertIsInstance(split.elevation_difference, Quantity)
        self.assertEquals(1.0, float(uh.kilometers(split.distance)))
        s.elevation_low = 1000
        s.pr_distance = 1000
        self.assertIsInstance(s.distance, Quantity)
        self.assertIsInstance(s.elevation_high, Quantity)
        self.assertIsInstance(s.elevation_low, Quantity)

src/s/t/stravalib-HEAD/stravalib/tests/test_model.py   stravalib(Download)
        split.distance = 1000 # meters
        split.elevation_difference = 1000 # meters
        self.assertIsInstance(split.distance, Quantity)
        self.assertIsInstance(split.elevation_difference, Quantity)
        self.assertEquals(1.0, float(uh.kilometers(split.distance)))
        s.elevation_low = 1000
        s.pr_distance = 1000
        self.assertIsInstance(s.distance, Quantity)
        self.assertIsInstance(s.elevation_high, Quantity)
        self.assertIsInstance(s.elevation_low, Quantity)