diff --git a/test/persistence/test_inmemory.py b/test/persistence/test_inmemory.py index 3de2f890..ba661aad 100644 --- a/test/persistence/test_inmemory.py +++ b/test/persistence/test_inmemory.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -import asyncio import unittest import plumpy @@ -13,16 +12,11 @@ def test_save_load_roundtrip(self): Test the plumpy.PicklePersister by taking a dummpy process, saving a checkpoint and recreating it from the same checkpoint """ - loop = asyncio.get_event_loop() process = ProcessWithCheckpoint() persister = plumpy.InMemoryPersister() persister.save_checkpoint(process) - bundle = persister.load_checkpoint(process.pid) - load_context = plumpy.LoadSaveContext(loop=loop) - recreated = bundle.unbundle(load_context) - def test_get_checkpoints_without_tags(self): """ """ process_a = ProcessWithCheckpoint() @@ -68,8 +62,6 @@ def test_get_process_checkpoints(self): checkpoint_a1 = plumpy.PersistedCheckpoint(process_a.pid, '1') checkpoint_a2 = plumpy.PersistedCheckpoint(process_a.pid, '2') - checkpoint_b1 = plumpy.PersistedCheckpoint(process_b.pid, '1') - checkpoint_b2 = plumpy.PersistedCheckpoint(process_b.pid, '2') checkpoints = [checkpoint_a1, checkpoint_a2] @@ -90,8 +82,6 @@ def test_delete_process_checkpoints(self): checkpoint_a1 = plumpy.PersistedCheckpoint(process_a.pid, '1') checkpoint_a2 = plumpy.PersistedCheckpoint(process_a.pid, '2') - checkpoint_b1 = plumpy.PersistedCheckpoint(process_b.pid, '1') - checkpoint_b2 = plumpy.PersistedCheckpoint(process_b.pid, '2') persister = plumpy.InMemoryPersister() persister.save_checkpoint(process_a, tag='1') diff --git a/test/persistence/test_pickle.py b/test/persistence/test_pickle.py index 0046792d..5c2b306a 100644 --- a/test/persistence/test_pickle.py +++ b/test/persistence/test_pickle.py @@ -1,5 +1,4 @@ # -*- coding: utf-8 -*- -import asyncio import tempfile import unittest @@ -17,17 +16,12 @@ def test_save_load_roundtrip(self): Test the plumpy.PicklePersister by taking a dummpy process, saving a checkpoint and recreating it from the same checkpoint """ - loop = asyncio.get_event_loop() process = ProcessWithCheckpoint() with tempfile.TemporaryDirectory() as directory: persister = plumpy.PicklePersister(directory) persister.save_checkpoint(process) - bundle = persister.load_checkpoint(process.pid) - load_context = plumpy.LoadSaveContext(loop=loop) - recreated = bundle.unbundle(load_context) - def test_get_checkpoints_without_tags(self): """ """ process_a = ProcessWithCheckpoint() @@ -75,8 +69,6 @@ def test_get_process_checkpoints(self): checkpoint_a1 = plumpy.PersistedCheckpoint(process_a.pid, '1') checkpoint_a2 = plumpy.PersistedCheckpoint(process_a.pid, '2') - checkpoint_b1 = plumpy.PersistedCheckpoint(process_b.pid, '1') - checkpoint_b2 = plumpy.PersistedCheckpoint(process_b.pid, '2') checkpoints = [checkpoint_a1, checkpoint_a2] @@ -98,8 +90,6 @@ def test_delete_process_checkpoints(self): checkpoint_a1 = plumpy.PersistedCheckpoint(process_a.pid, '1') checkpoint_a2 = plumpy.PersistedCheckpoint(process_a.pid, '2') - checkpoint_b1 = plumpy.PersistedCheckpoint(process_b.pid, '1') - checkpoint_b2 = plumpy.PersistedCheckpoint(process_b.pid, '2') with tempfile.TemporaryDirectory() as directory: persister = plumpy.PicklePersister(directory)