mirror of
https://github.com/python/cpython.git
synced 2025-08-23 10:16:01 +00:00
Issue #23883: Missing fileinput.__all__ APIs; patch by Mauro SM Rodrigues
This commit is contained in:
parent
7b3a82ff55
commit
7978e10441
3 changed files with 11 additions and 1 deletions
|
@ -82,7 +82,8 @@ XXX Possible additions:
|
||||||
import sys, os
|
import sys, os
|
||||||
|
|
||||||
__all__ = ["input", "close", "nextfile", "filename", "lineno", "filelineno",
|
__all__ = ["input", "close", "nextfile", "filename", "lineno", "filelineno",
|
||||||
"isfirstline", "isstdin", "FileInput"]
|
"fileno", "isfirstline", "isstdin", "FileInput", "hook_compressed",
|
||||||
|
"hook_encoded"]
|
||||||
|
|
||||||
_state = None
|
_state = None
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,7 @@ from fileinput import FileInput, hook_encoded
|
||||||
|
|
||||||
from test.support import verbose, TESTFN, run_unittest, check_warnings
|
from test.support import verbose, TESTFN, run_unittest, check_warnings
|
||||||
from test.support import unlink as safe_unlink
|
from test.support import unlink as safe_unlink
|
||||||
|
from test import support
|
||||||
from unittest import mock
|
from unittest import mock
|
||||||
|
|
||||||
|
|
||||||
|
@ -913,5 +914,12 @@ class Test_hook_encoded(unittest.TestCase):
|
||||||
check('rb', ['A\n', 'B\r\n', 'C\r', 'D\u20ac'])
|
check('rb', ['A\n', 'B\r\n', 'C\r', 'D\u20ac'])
|
||||||
|
|
||||||
|
|
||||||
|
class MiscTest(unittest.TestCase):
|
||||||
|
|
||||||
|
def test_all(self):
|
||||||
|
blacklist = {'DEFAULT_BUFSIZE'}
|
||||||
|
support.check__all__(self, fileinput, blacklist=blacklist)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
|
|
@ -1219,6 +1219,7 @@ Mark Roddy
|
||||||
Kevin Rodgers
|
Kevin Rodgers
|
||||||
Sean Rodman
|
Sean Rodman
|
||||||
Giampaolo Rodola
|
Giampaolo Rodola
|
||||||
|
Mauro S. M. Rodrigues
|
||||||
Elson Rodriguez
|
Elson Rodriguez
|
||||||
Adi Roiban
|
Adi Roiban
|
||||||
Luis Rojas
|
Luis Rojas
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue