def testProfilePrintingDefaultSmoke(self):
     # This will print to sys.stderr, so we can't make any assertions about the
     # output. But we can check that it doesn't fail.
     ee.data.computeValue = self.MockValue
     with ee.profilePrinting():
         self.assertEqual('hooked=True getProfiles=False',
                          ee.Number(1).getInfo())
 def testProfilePrinting(self):
     ee.data.computeValue = self.MockValue
     out = six.StringIO()
     with ee.profilePrinting(destination=out):
         self.assertEqual('hooked=True getProfiles=False',
                          ee.Number(1).getInfo())
     self.assertEqual('hooked=False getProfiles=True', out.getvalue())
Beispiel #3
0
 def testProfilePrinting(self):
     out = StringIO.StringIO()
     with ee.profilePrinting(destination=out):
         self.assertEquals('hooked=True getProfiles=False',
                           ee.Number(1).getInfo())
     self.assertEquals('hooked=False getProfiles=True', out.getvalue())
Beispiel #4
0
 def testProfilePrintingDefaultSmoke(self):
   # This will print to sys.stderr, so we can't make any assertions about the
   # output. But we can check that it doesn't fail.
   with ee.profilePrinting():
     self.assertEquals('hooked=True getProfiles=False', ee.Number(1).getInfo())
Beispiel #5
0
 def testProfilePrinting(self):
   out = StringIO.StringIO()
   with ee.profilePrinting(destination=out):
     self.assertEquals('hooked=True getProfiles=False', ee.Number(1).getInfo())
   self.assertEquals('hooked=False getProfiles=True', out.getvalue())