Esempio n. 1
0
    def test_reconfiguration_lock(self):
        mlos_object = MlosObject(int, int)

        assert not mlos_object._reconfiguration_lock._is_owned()
        with mlos_object.reconfiguration_lock():
            assert mlos_object._reconfiguration_lock._is_owned()
        assert not mlos_object._reconfiguration_lock._is_owned()
Esempio n. 2
0
    def test_reconfiguration_lock(self):
        mlos_object = MlosObject(int, int)

        self.assertFalse(mlos_object._reconfiguration_lock._is_owned())
        with mlos_object.reconfiguration_lock():
            self.assertTrue(mlos_object._reconfiguration_lock._is_owned())
        self.assertFalse(mlos_object._reconfiguration_lock._is_owned())