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

All Samples(76)  |  Call(76)  |  Derive(0)  |  Import(0)
Fail if the two objects are unequal as determined by the '=='
operator.

src/s/t/stravalib-0.2.2/stravalib/tests/functional/test_client.py   stravalib(Download)
    def test_get_activity(self):
        """ Test basic activity fetching. """
        activity = self.client.get_activity(96089609)
        self.assertEquals('El Dorado County, CA, USA', activity.location_city)
 
 
        self.assertIsInstance(activity.athlete, model.Athlete)
        self.assertEquals(1513, activity.athlete.id)
 
        #self.assertAlmostEqual(first, second, places, msg, delta)
        # Ensure that iw as read in with correct units
        self.assertEquals(22.5308, float(uh.kilometers(activity.distance)))
        zones = self.client.get_activity_zones(99895560)
        print zones
        self.assertEquals(1, len(zones))
        self.assertIsInstance(zones[0], model.PaceActivityZone)
 
        # Indirectly
        activity = self.client.get_activity(99895560)
        self.assertEquals(len(zones), len(activity.zones))

src/s/t/stravalib-HEAD/stravalib/tests/functional/test_client.py   stravalib(Download)
    def test_get_activity(self):
        """ Test basic activity fetching. """
        activity = self.client.get_activity(96089609)
        self.assertEquals('El Dorado County, CA, USA', activity.location_city)
 
 
        self.assertIsInstance(activity.athlete, model.Athlete)
        self.assertEquals(1513, activity.athlete.id)
 
        #self.assertAlmostEqual(first, second, places, msg, delta)
        # Ensure that iw as read in with correct units
        self.assertEquals(22.5308, float(uh.kilometers(activity.distance)))
        zones = self.client.get_activity_zones(99895560)
        print zones
        self.assertEquals(1, len(zones))
        self.assertIsInstance(zones[0], model.PaceActivityZone)
 
        # Indirectly
        activity = self.client.get_activity(99895560)
        self.assertEquals(len(zones), len(activity.zones))

src/s/t/stravalib-0.2.2/stravalib/tests/functional/test_result_iterator.py   stravalib(Download)
        results = BatchedResultsIterator(entity=model.Activity, result_fetcher=result_fetcher, limit=10, per_page=2)
        results = list(results)
        self.assertEquals(10, len(results))
 
    def test_limit_iterator(self):
        results.limit = 10
        results = list(results)
        self.assertEquals(10, len(results))
 
 
        ri = BatchedResultsIterator(entity=model.Shoe, result_fetcher=pretend_fetcher)
        results = list(ri)
        self.assertEquals(0, len(results))
 

src/s/t/stravalib-HEAD/stravalib/tests/functional/test_result_iterator.py   stravalib(Download)
        results = BatchedResultsIterator(entity=model.Activity, result_fetcher=result_fetcher, limit=10, per_page=2)
        results = list(results)
        self.assertEquals(10, len(results))
 
    def test_limit_iterator(self):
        results.limit = 10
        results = list(results)
        self.assertEquals(10, len(results))
 
 
        ri = BatchedResultsIterator(entity=model.Shoe, result_fetcher=pretend_fetcher)
        results = list(ri)
        self.assertEquals(0, len(results))