]> granicus.if.org Git - python/commitdiff
Issue #23883: Missing fileinput.__all__ APIs; patch by Mauro SM Rodrigues
authorMartin Panter <vadmium+py@gmail.com>
Sat, 16 Jan 2016 06:26:54 +0000 (06:26 +0000)
committerMartin Panter <vadmium+py@gmail.com>
Sat, 16 Jan 2016 06:26:54 +0000 (06:26 +0000)
Lib/fileinput.py
Lib/test/test_fileinput.py
Misc/ACKS

index 021e39f83a370f5ae93eb9aaf4a30a7a685f92e3..3543653f268be48c87f3d7a70b3c0e38e93cbf3b 100644 (file)
@@ -82,7 +82,8 @@ XXX Possible additions:
 import sys, os
 
 __all__ = ["input", "close", "nextfile", "filename", "lineno", "filelineno",
-           "isfirstline", "isstdin", "FileInput"]
+           "fileno", "isfirstline", "isstdin", "FileInput", "hook_compressed",
+           "hook_encoded"]
 
 _state = None
 
index 91c11668bd6dbeb296c4a1d0b46a04dfbbeeca16..ad8130468b56ab8a7e275b15d7579929646d50e1 100644 (file)
@@ -24,6 +24,7 @@ from fileinput import FileInput, hook_encoded
 
 from test.support import verbose, TESTFN, run_unittest, check_warnings
 from test.support import unlink as safe_unlink
+from test import support
 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'])
 
 
+class MiscTest(unittest.TestCase):
+
+    def test_all(self):
+        blacklist = {'DEFAULT_BUFSIZE'}
+        support.check__all__(self, fileinput, blacklist=blacklist)
+
+
 if __name__ == "__main__":
     unittest.main()
index b24318171e996adbfcc0aea28200aeda048c4269..1df5d24da08a92f5c3b6f0e68f393ba4e6f7eb5b 100644 (file)
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -1219,6 +1219,7 @@ Mark Roddy
 Kevin Rodgers
 Sean Rodman
 Giampaolo Rodola
+Mauro S. M. Rodrigues
 Elson Rodriguez
 Adi Roiban
 Luis Rojas