Ran update_copyright.py.
[hooke.git] / test / config.py
index 0ef82cb2ec8d6e3f77246b2fef40da3d6f67d41a..8381c0da266a6b8949328a6372e5b6b66e88611f 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2010 W. Trevor King <wking@drexel.edu>
+# Copyright (C) 2010-2012 W. Trevor King <wking@drexel.edu>
 #
 # This file is part of Hooke.
 #
@@ -21,6 +21,7 @@ Test the commands listed in :file:`doc/tutorial.txt`.
 
 >>> import os
 >>> import os.path
+>>> from uuid import uuid4
 >>> from hooke.hooke import Hooke, HookeRunner
 >>> h = Hooke()
 >>> r = HookeRunner()
@@ -47,14 +48,15 @@ Success
 temperature = 295.3
 <BLANKLINE>
 ...
->>> config_already_exists = os.path.exists('myconfig.cfg')
+>>> file_name = '%s.cfg' % uuid4()
+>>> config_already_exists = os.path.exists(file_name)
 >>> config_already_exists
 False
->>> h = r.run_lines(h, ['save_config --output myconfig.cfg'])
+>>> h = r.run_lines(h, ['save_config --output %s' % file_name])
 Success
 <BLANKLINE>
->>> os.path.isfile('myconfig.cfg')
+>>> os.path.isfile(file_name)
 True
 >>> if config_already_exists == False:
-...     os.remove('myconfig.cfg')
+...     os.remove(file_name)
 """