Ejemplo n.º 1
0
    def test_init_shutdown(self):
        measurement.init(self.config)
        self.assertTrue(measurement.measurement._save_process.is_alive())
        self.assertIsNotNone(measurement.measurement._save_queue)

        measurement.shutdown()
        self.assertIsNone(measurement.measurement._save_process)
        self.assertIsNone(measurement.measurement._save_queue)
Ejemplo n.º 2
0
    def test_enable_disable(self):
        storage = fixture.Storage(self.config)
        measurement.init(self.config, fixture.Storage)

        measure = measurement.enable("testing")
        fixture.nop()
        measurement.disable(measure)
        measurement.shutdown()

        self.assertEqualMeasure(fixture.Storage().last(), measure)