Commit b4a98238 authored by Robert McGibbon's avatar Robert McGibbon
Browse files

typo fix -- thanks @peastman

parent a584bc96
......@@ -37,11 +37,11 @@ __all__ = ['CheckpointReporter']
class CheckpointReporter(object):
"""CheckpointReporter saves periodic checkpoints of a simulation.
The checkpoints will overwrite one and other -- only the last checkpoint
The checkpoints will overwrite one another -- only the last checkpoint
will be saved in the file.
To use it, create a CheckpointReporter, then add it to the Simulation's
list of reporters. To load a checkpoint file a continue a simulation,
list of reporters. To load a checkpoint file and continue a simulation,
use the following recipe:
>>> with open('checkput.chk', 'rb') as f:
......
......@@ -20,7 +20,10 @@ class TestCheckpointReporter(unittest.TestCase):
self.simulation.reporters.append(app.CheckpointReporter(file, 1))
self.simulation.step(1)
with open(file.name, 'rb') as f:
self.simulation.context.loadCheckpoint(f.read())
file.close()
if __name__ == '__main__':
unittest.main()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment