(self)
| 4889 | return modules |
| 4890 | |
| 4891 | def test_import(self): |
| 4892 | modules = self.get_module_names() |
| 4893 | if sys.platform == 'win32': |
| 4894 | modules.remove('multiprocessing.popen_fork') |
| 4895 | modules.remove('multiprocessing.popen_forkserver') |
| 4896 | modules.remove('multiprocessing.popen_spawn_posix') |
| 4897 | else: |
| 4898 | modules.remove('multiprocessing.popen_spawn_win32') |
| 4899 | if not HAS_REDUCTION: |
| 4900 | modules.remove('multiprocessing.popen_forkserver') |
| 4901 | |
| 4902 | if c_int is None: |
| 4903 | # This module requires _ctypes |
| 4904 | modules.remove('multiprocessing.sharedctypes') |
| 4905 | |
| 4906 | for name in modules: |
| 4907 | __import__(name) |
| 4908 | mod = sys.modules[name] |
| 4909 | self.assertTrue(hasattr(mod, '__all__'), name) |
| 4910 | |
| 4911 | for attr in mod.__all__: |
| 4912 | self.assertTrue( |
| 4913 | hasattr(mod, attr), |
| 4914 | '%r does not have attribute %r' % (mod, attr) |
| 4915 | ) |
| 4916 | |
| 4917 | # |
| 4918 | # Quick test that logging works -- does not test logging output |
nothing calls this directly
no test coverage detected