Supervisor/supervisor — Issue #63: Failing test - import profile
Author: JensRantil
Created: 2011-12-02 13:17:49+00:00
State: open

I just executed `python setup.py test` and received one single failing test

[...]
test_update_not_on_shutdown (supervisor.tests.test_supervisorctl.TestDefaultControllerPlugin) ... ok
test_update_removed_procs (supervisor.tests.test_supervisorctl.TestDefaultControllerPlugin) ... ok
test_version (supervisor.tests.test_supervisorctl.TestDefaultControllerPlugin) ... ok

======================================================================
ERROR: test_main_profile (supervisor.tests.test_supervisord.EntryPointTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/jens/src/Internal projects/supervisor/supervisor/tests/test_supervisord.py", line 53, in test_main_profile
'--profile_options=cumulative,calls'], test=True)
File "/home/jens/src/Internal projects/supervisor/supervisor/supervisord.py", line 358, in main
profile('go(options)', globals(), locals(), sort_order, callers)
File "/home/jens/src/Internal projects/supervisor/supervisor/supervisord.py", line 325, in profile
import profile
ImportError: No module named profile

----------------------------------------------------------------------
Ran 710 tests in 1.600s

FAILED (errors=1)

I had no idea that the `profile` package was not included in the standard Python distribution. To try to come up with a patch to fix the problem, I've been searching the web all over to find the PyPi equivalent of the DEB package `python-profiler`, but can't find it. Does it exist? Should this test be considered a bug, or should we require every developer to install the Python DEB package for `profile`?

I currently can speak for other platforms that GNU/Linux Ubuntu/Debian. How do you install `profile` on MacOSX for example?