Example #1
0
    def test_reload_with_updated_error(self):
        config = MemoryConfig().reload_every(0.005)

        ev = Event()

        @config.on_updated
        def updated():
            ev.set()
            raise MemoryError()

        config.load()

        time.sleep(0.02)

        self.assertTrue(ev.is_set())
Example #2
0
 def test_load(self):
     # it should do nothing
     config = MemoryConfig()
     config.load()