• Home
  • Raw
  • Download

Lines Matching refs:_file

1056         self._box._file.flush()
1057 self._box._file.seek(0)
1058 contents = self._box._file.read()
2024 self._file = open(self._path, 'wb+')
2027 self._file.close()
2032 self._file.write(b'foo')
2033 pos = self._file.tell()
2034 proxy0 = mailbox._ProxyFile(self._file)
2036 self.assertEqual(self._file.tell(), pos)
2037 proxy1 = mailbox._ProxyFile(self._file, 0)
2039 self.assertEqual(self._file.tell(), pos)
2042 self._file.write(b'bar')
2043 self._test_read(mailbox._ProxyFile(self._file))
2046 self._file.write(bytes('foo%sbar%sfred%sbob' % (os.linesep, os.linesep,
2048 self._test_readline(mailbox._ProxyFile(self._file))
2051 self._file.write(bytes('foo%sbar%sfred%sbob' % (os.linesep, os.linesep,
2053 self._test_readlines(mailbox._ProxyFile(self._file))
2056 self._file.write(bytes('foo%sbar%sfred%sbob' % (os.linesep, os.linesep,
2058 self._test_iteration(mailbox._ProxyFile(self._file))
2061 self._file.write(bytes('foo%sbar%s' % (os.linesep, os.linesep), 'ascii'))
2062 self._test_seek_and_tell(mailbox._ProxyFile(self._file))
2065 self._file.write(bytes('foo%sbar%s' % (os.linesep, os.linesep), 'ascii'))
2066 self._test_close(mailbox._ProxyFile(self._file))
2073 self._file = open(self._path, 'wb+')
2076 self._file.close()
2081 self._file.write(bytes('foo' + os.linesep + 'bar', 'ascii'))
2082 pos = self._file.tell()
2083 proxy = mailbox._PartialFile(self._file, 2, 5)
2085 self.assertEqual(self._file.tell(), pos)
2088 self._file.write(bytes('***bar***', 'ascii'))
2089 self._test_read(mailbox._PartialFile(self._file, 3, 6))
2092 self._file.write(bytes('!!!!!foo%sbar%sfred%sbob!!!!!' %
2094 self._test_readline(mailbox._PartialFile(self._file, 5,
2098 self._file.write(bytes('foo%sbar%sfred%sbob?????' %
2100 self._test_readlines(mailbox._PartialFile(self._file, 0,
2104 self._file.write(bytes('____foo%sbar%sfred%sbob####' %
2106 self._test_iteration(mailbox._PartialFile(self._file, 4,
2110 self._file.write(bytes('(((foo%sbar%s$$$' % (os.linesep, os.linesep), 'ascii'))
2111 self._test_seek_and_tell(mailbox._PartialFile(self._file, 3,
2115 self._file.write(bytes('&foo%sbar%s^' % (os.linesep, os.linesep), 'ascii'))
2116 self._test_close(mailbox._PartialFile(self._file, 1,