Exemple #1
0
 def test_ystats_format(self):
     requires_yappi()
     with env(format='ystat') as filename:
         cpu.start()
         cpu.is_running()  # Let if profile something
         cpu.stop()
         self.assertNotRaises(open_ystats, filename)
Exemple #2
0
 def test_is_running(self):
     requires_yappi()
     self.assertFalse(cpu.is_running())
     cpu.start()
     try:
         self.assertTrue(cpu.is_running())
     finally:
         cpu.stop()
     self.assertFalse(cpu.is_running())
Exemple #3
0
 def test_is_running(self):
     requires_yappi()
     self.assertFalse(cpu.is_running())
     cpu.start()
     try:
         self.assertTrue(cpu.is_running())
     finally:
         cpu.stop()
     self.assertFalse(cpu.is_running())
Exemple #4
0
 def test_disabled(self):
     with env(enable='false'):
         cpu.start()
         try:
             self.assertFalse(cpu.is_running())
         finally:
             cpu.stop()
Exemple #5
0
 def test_ystats_format(self):
     requires_yappi()
     cpu.start()
     cpu.is_running()  # Let if profile something
     cpu.stop()
     self.assertNotRaises(open_ystats, FILENAME)
Exemple #6
0
 def profiled_function(self):
     self.assertTrue(cpu.is_running())
Exemple #7
0
 def test_disabled(self):
     cpu.start()
     try:
         self.assertFalse(cpu.is_running())
     finally:
         cpu.stop()
Exemple #8
0
 def test_ystats_format(self):
     requires_yappi()
     cpu.start()
     cpu.is_running()  # Let if profile something
     cpu.stop()
     self.assertNotRaises(open_ystats, FILENAME)
Exemple #9
0
 def profiled_function(self):
     self.assertTrue(cpu.is_running())
Exemple #10
0
 def test_disabled(self):
     cpu.start()
     try:
         self.assertFalse(cpu.is_running())
     finally:
         cpu.stop()