I am writing unit tests for a script that sends python code to Autodesk Maya trough the commandPort. The script works; it sends code fine to Maya which executes it. For testing purposes however, I want to write a unit test that in its setUp() opens a standalone (commandline) Maya with a commandPort which I can send commands to and then close again in tearDown(), so that I don't have to keep the real Maya application open whenever I work on the scripts.
How do I go about doing that?