コード例 #1
0
 def testTotalModeShare(self):
   modeshare = carbon.getModeShare(None, self.weekago, self.now)
   self.assertEqual(modeshare['walking'], 5)
   self.assertEqual(modeshare['bus'], 5)
   self.assertEqual(modeshare['cycling'], 0)
   self.assertEqual(modeshare['car'], 0)
   self.assertEqual(modeshare['train'], 0)
コード例 #2
0
 def testTotalModeShare(self):
     modeshare = carbon.getModeShare(None, self.weekago, self.now)
     self.assertEqual(modeshare['walking'], 5)
     self.assertEqual(modeshare['bus'], 5)
     self.assertEqual(modeshare['cycling'], 0)
     self.assertEqual(modeshare['car'], 0)
     self.assertEqual(modeshare['train'], 0)
コード例 #3
0
 def testMyModeShare(self):
   modeshare = carbon.getModeShare('*****@*****.**', self.weekago, self.now)
   print modeshare
   self.assertEqual(modeshare['walking'], 1)
   self.assertEqual(modeshare['bus'], 1)
   self.assertEqual(modeshare['cycling'], 0)
   self.assertEqual(modeshare['car'], 0)
   self.assertEqual(modeshare['train'], 0)
コード例 #4
0
 def testMyModeShare(self):
     modeshare = carbon.getModeShare('*****@*****.**', self.weekago,
                                     self.now)
     print modeshare
     self.assertEqual(modeshare['walking'], 1)
     self.assertEqual(modeshare['bus'], 1)
     self.assertEqual(modeshare['cycling'], 0)
     self.assertEqual(modeshare['car'], 0)
     self.assertEqual(modeshare['train'], 0)