mirror of
https://github.com/python/cpython.git
synced 2025-11-01 06:01:29 +00:00
Support name and mode attributes on all file types.
Don't read more than one line when reading text from a tty device. Add peek() and read1() methods. Return str instead of unicode when return ASCII characters in text mode.
This commit is contained in:
parent
913dd0be52
commit
13633bb8c5
3 changed files with 83 additions and 18 deletions
|
|
@ -51,6 +51,7 @@ def testAttributes(self):
|
|||
|
||||
self.assertEquals(f.mode, "w")
|
||||
self.assertEquals(f.closed, False)
|
||||
self.assertEquals(f.name, TESTFN)
|
||||
|
||||
# verify the attributes are readonly
|
||||
for attr in 'mode', 'closed':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue