From: W. Trevor King Date: Wed, 30 Dec 2009 01:06:27 +0000 (-0500) Subject: Don't chdir() in libbe/command/html.py doctests. X-Git-Tag: 1.0.0~59^2~52^2~13 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1a66c3f33c4ccbdf1c430c0d6af3d028ef261d4b;p=be.git Don't chdir() in libbe/command/html.py doctests. --- diff --git a/libbe/command/html.py b/libbe/command/html.py index 059fe75..99cd61f 100644 --- a/libbe/command/html.py +++ b/libbe/command/html.py @@ -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'