def test_reload(self): BlokManager.load() BlokManager.set('invalid blok', None) BlokManager.get('invalid blok') BlokManager.reload() with pytest.raises(BlokManagerException): BlokManager.get('invalid blok')
def reload_blokmanager(cls, **kwargs): """Reload all the bloks with their code sources""" RegistryManager.clear() # close all the registry BlokManager.reload() # reload all the blok code # FIXME BlokManager.reload should close all the registry and # forbidden load registry during the reload return [{'type': 'RELOAD'}]
def test_reload(self): BlokManager.load() BlokManager.set('invalid blok', None) BlokManager.get('invalid blok') BlokManager.reload() try: BlokManager.get('invalid blok') self.fail("Reload classmethod doesn't reload the bloks") except BlokManagerException: pass
def test_reload_without_load(self): try: BlokManager.reload() self.fail('No exception when reload without previously load') except BlokManagerException: pass
def test_reload_without_load(self): with pytest.raises(BlokManagerException): BlokManager.reload()