|Reported by:||atagar||Owned by:||atagar|
Stem's proc utilities  are currently completely untested. Precious little stem's core functionality currently relies on them, but arm and other stem users will likely find them to be useful for gathering basic information about the tor process (cpu/memory usage, uptime, etc) so we should strive to make them reliable.
For unit tests we'll want to mock out the os functions used by the proc module to stress both cases where it should succeed, and failure/edge cases. For an example of the mocking see stem.util.system's unit tests .
Integration tests should be easier. For those we simply need to exercise the proc functions against the tor process that we're running against. To get its pid run...
tor_pid = test.runner.get_runner().get_pid()
Each test should check stem.util.proc.is_available() and, if that's False, then skip the test since proc utilities are unavailable on that platform.
After the testing is in place we can made a long-awaited fix for the proc module (described in the bugs section of stem's wiki ).
Let me know if you run into any issues or have questions! Don't be shy to ask - it's far better for me to spend a few minutes answering a question that for you to bang your head against a wall for any length of time. :)