diff --git a/src/plumpy/base/utils.py b/src/plumpy/base/utils.py index 2b9728e9..232c5d26 100644 --- a/src/plumpy/base/utils.py +++ b/src/plumpy/base/utils.py @@ -16,7 +16,7 @@ def wrapper(self: Any, *args: Any, **kwargs: Any) -> None: wrapped(self, *args, **kwargs) self._called -= 1 - #the following is to show the correct name later in the call_with_super_check error message + # Forward wrapped function name to the decorator to show the correct name in the ``call_with_super_check`` wrapper.__name__ = wrapped.__name__ return wrapper diff --git a/src/plumpy/event_helper.py b/src/plumpy/event_helper.py index b36cd602..9da6ca9a 100644 --- a/src/plumpy/event_helper.py +++ b/src/plumpy/event_helper.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- import logging -from typing import TYPE_CHECKING, Any, Callable, Set, Type +from typing import TYPE_CHECKING, Any, Callable from . import persistence diff --git a/test/test_processes.py b/test/test_processes.py index 4b7494f5..158cce66 100644 --- a/test/test_processes.py +++ b/test/test_processes.py @@ -800,9 +800,8 @@ def test_instance_state_with_outputs(self): # Check that it is a copy self.assertIsNot(outputs, bundle.get(BundleKeys.OUTPUTS, {})) # Check the contents are the same - #we remove the ProcessSaver instance that is an object used only for testing + # Remove the ``ProcessSaver`` instance that is only used for testing utils.compare_dictionaries(None, None, outputs, bundle.get(BundleKeys.OUTPUTS, {}), exclude={'_listeners'}) - #self.assertDictEqual(outputs, bundle.get(BundleKeys.OUTPUTS, {})) self.assertIsNot(proc.outputs, saver.snapshots[-1].get(BundleKeys.OUTPUTS, {})) @@ -877,7 +876,6 @@ def _check_round_trip(self, proc1): bundle2 = plumpy.Bundle(proc2) self.assertEqual(proc1.pid, proc2.pid) - #self.assertDictEqual(bundle1, bundle2) utils.compare_dictionaries(None, None, bundle1, bundle2, exclude={'_listeners'}) diff --git a/test/test_workchains.py b/test/test_workchains.py index 6d9f26c5..c698aff9 100644 --- a/test/test_workchains.py +++ b/test/test_workchains.py @@ -304,11 +304,9 @@ def define(cls, spec): ) def step1(self): - print('step1') persister.save_checkpoint(self, 'step1') def step2(self): - print('step2') persister.save_checkpoint(self, 'step2') # add SimpleWorkChain and TestListener to this module global namespace, so they can be reloaded from checkpoint @@ -321,7 +319,6 @@ def step2(self): self.assertEqual(process_finished_count, 1) - print('reload persister checkpoint:') workchain_checkpoint = persister.load_checkpoint(workchain.pid, 'step1').unbundle() workchain_checkpoint.execute() self.assertEqual(process_finished_count, 2)