Message188197
created a project with the following content
CODEC/
CODEC/video.py
CODEC/audio.py
CODEC/__init__.py
CRC/
CRC/crc24.py
CRC/crc32.py
CRC/__init__.py
TEST/test_crc.py
TEST/test_codec.py
TEST/__init__.py
__init__.py
test.py
main.py
test.py contain tests that launches multiple multiprocessing.Process to test diffferent module in parallel, but always fail to launch child processes for test with AttributeError. I spent lots of time trying to figure out why my code don't work. I also tried to use the examples from http://docs.python.org/dev/library/multiprocessing.html#the-process-class and they also gives AttributeError when launching child process. in the end, I figured out it's because Pythong file test.py has same name as package TEST. change test.py to test_all.py and everything worked.
It looks multiprocessing import defaults to import package, not the parent file when file name without suffix is same as package. |
|
Date |
User |
Action |
Args |
2013-05-01 01:28:02 | hct | set | recipients:
+ hct |
2013-05-01 01:28:02 | hct | set | messageid: <1367371682.48.0.908300768897.issue17885@psf.upfronthosting.co.za> |
2013-05-01 01:28:02 | hct | link | issue17885 messages |
2013-05-01 01:28:01 | hct | create | |
|