Refactoring: split test.py and rewrite tests for process

Tests for process.py completely rewritten to be more 'unit'.

Moved one function from utils that does not belong there
and fixed small issues uncovered by the new tests.

To simplify migration, prevent Python from writing bytecode
during testing.

Change-Id: Ie2c5d9217982620ba62f8105cf8e4b2cfaefe885