From: W. Trevor King Date: Thu, 12 May 2011 20:21:09 +0000 (-0400) Subject: Use open() instead of file() in CachedPathID doctests (2to3 compatability). X-Git-Tag: 1.1.0~186 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=c5d08a943af56afb4ce1f9ae114bfb756acd0e95;p=be.git Use open() instead of file() in CachedPathID doctests (2to3 compatability). --- diff --git a/libbe/storage/vcs/base.py b/libbe/storage/vcs/base.py index 8d2ab60..d377398 100644 --- a/libbe/storage/vcs/base.py +++ b/libbe/storage/vcs/base.py @@ -156,11 +156,11 @@ class CachedPathID (object): >>> os.mkdir(os.path.join(dir.path, '.be', 'abc', 'bugs', '123', 'comments')) >>> os.mkdir(os.path.join(dir.path, '.be', 'abc', 'bugs', '123', 'comments', 'def')) >>> os.mkdir(os.path.join(dir.path, '.be', 'abc', 'bugs', '456')) - >>> file(os.path.join(dir.path, '.be', 'abc', 'values'), + >>> open(os.path.join(dir.path, '.be', 'abc', 'values'), ... 'w').close() - >>> file(os.path.join(dir.path, '.be', 'abc', 'bugs', '123', 'values'), + >>> open(os.path.join(dir.path, '.be', 'abc', 'bugs', '123', 'values'), ... 'w').close() - >>> file(os.path.join(dir.path, '.be', 'abc', 'bugs', '123', 'comments', 'def', 'values'), + >>> open(os.path.join(dir.path, '.be', 'abc', 'bugs', '123', 'comments', 'def', 'values'), ... 'w').close() >>> c = CachedPathID() >>> c.root(dir.path)