'Ensure that __all__ is populated properly.'

def test__all__(self):

    intentionally_excluded = {'list2cmdline', 'Handle'}
    exported = set(subprocess.__all__)
    possible_exports = set()
    import types
    for (name, value) in subprocess.__dict__.items():
        if name.startswith('_'):
            continue
        if isinstance(value, (types.ModuleType,)):
            continue
        possible_exports.add(name)
    self.assertEqual(exported, (possible_exports - intentionally_excluded))
