瀏覽代碼

Kill doctest in dulwich.file. This breaks the epytext parser.

Jelmer Vernooij 14 年之前
父節點
當前提交
1acb5f1c39
共有 1 個文件被更改,包括 1 次插入16 次删除
  1. 1 16
      dulwich/file.py

+ 1 - 16
dulwich/file.py

@@ -71,22 +71,7 @@ def GitFile(filename, mode='rb', bufsize=-1):
     Only read-only and write-only (binary) modes are supported; r+, w+, and a
     Only read-only and write-only (binary) modes are supported; r+, w+, and a
     are not.  To read and write from the same file, you can take advantage of
     are not.  To read and write from the same file, you can take advantage of
     the fact that opening a file for write does not actually open the file you
     the fact that opening a file for write does not actually open the file you
-    request:
-
-    >>> write_file = GitFile('filename', 'wb')
-    >>> read_file = GitFile('filename', 'rb')
-    >>> read_file.readlines()
-    ['contents\n', 'of\n', 'the\n', 'file\n']
-    >>> write_file.write('foo')
-    >>> read_file.close()
-    >>> write_file.close()
-    >>> new_file = GitFile('filename', 'rb')
-    'foo'
-    >>> new_file.close()
-    >>> other_file = GitFile('filename', 'wb')
-    Traceback (most recent call last):
-        ...
-    OSError: [Errno 17] File exists: 'filename.lock'
+    request.
     """
     """
     if 'a' in mode:
     if 'a' in mode:
         raise IOError('append mode not supported for Git files')
         raise IOError('append mode not supported for Git files')