diff -r 6b70f16d585a Lib/tarfile.py --- a/Lib/tarfile.py Wed Apr 15 10:27:58 2015 -0400 +++ b/Lib/tarfile.py Wed Apr 15 13:54:14 2015 -0500 @@ -64,7 +64,11 @@ pass # from tarfile import * -__all__ = ["TarFile", "TarInfo", "is_tarfile", "TarError"] +__all__ = ["TarFile", "TarInfo", "is_tarfile", "TarError", + "TarIter", "ReadError", "CompressionError", "StreamError", + "ExtractError", "HeaderError", "SubsequentHeaderError", + "InvalidHeaderError", "EmptyHeaderError", "EOFHeaderError", + "TruncatedHeaderError", "main", "open"] #--------------------------------------------------------- # tar constants diff -r 6b70f16d585a Lib/test/test_tarfile.py --- a/Lib/test/test_tarfile.py Wed Apr 15 10:27:58 2015 -0400 +++ b/Lib/test/test_tarfile.py Wed Apr 15 13:54:14 2015 -0500 @@ -1962,6 +1962,18 @@ with self.assertRaises(ValueError): tarfile.itn(0x10000000000, 6, tarfile.GNU_FORMAT) + def test_all(self): + expected = set() + blacklist = ('nts', 'nti', 'itn', 'stn', 'copyfileobj', 'calc_chksums', + 'filemode', 'ExFileObject') + for name in dir(tarfile): + if name.startswith('_') or name in blacklist: + continue + module_object = getattr(tarfile, name) + if getattr(module_object, '__module__', None) == 'tarfile': + expected.add(name) + self.assertCountEqual(tarfile.__all__, expected) + class CommandLineTest(unittest.TestCase):