Don't chdir() in libbe/command/html.py doctests.
authorW. Trevor King <wking@drexel.edu>
Wed, 30 Dec 2009 01:06:27 +0000 (20:06 -0500)
committerW. Trevor King <wking@drexel.edu>
Wed, 30 Dec 2009 01:06:27 +0000 (20:06 -0500)
libbe/command/html.py

index 059fe75ac2c63df5e3ece760a249bfa9eae1610b..99cd61f07ec4595f4ec79085792cb8d4b06ff562 100644 (file)
@@ -41,22 +41,19 @@ class HTML (libbe.command.Command):
     >>> cmd._setup_io = lambda i_enc,o_enc : None
     >>> cmd.stdout = sys.stdout
 
-    >>> cwd = os.getcwd()
-    >>> os.chdir(bd.storage.repo)
-    >>> ret = cmd.run()
-    >>> os.path.exists('./html_export')
+    >>> ret = cmd.run({'output':os.path.join(bd.storage.repo, 'html_export')})
+    >>> os.path.exists(os.path.join(bd.storage.repo, 'html_export'))
     True
-    >>> os.path.exists('./html_export/index.html')
+    >>> os.path.exists(os.path.join(bd.storage.repo, 'html_export', 'index.html'))
     True
-    >>> os.path.exists('./html_export/index_inactive.html')
+    >>> os.path.exists(os.path.join(bd.storage.repo, 'html_export', 'index_inactive.html'))
     True
-    >>> os.path.exists('./html_export/bugs')
+    >>> os.path.exists(os.path.join(bd.storage.repo, 'html_export', 'bugs'))
     True
-    >>> os.path.exists('./html_export/bugs/a.html')
+    >>> os.path.exists(os.path.join(bd.storage.repo, 'html_export', 'bugs', 'a.html'))
     True
-    >>> os.path.exists('./html_export/bugs/b.html')
+    >>> os.path.exists(os.path.join(bd.storage.repo, 'html_export', 'bugs', 'b.html'))
     True
-    >>> os.chdir(cwd)
     >>> bd.cleanup()
     """
     name = 'html'