I have a python module/script which does a few of these

1. At various nested levels inside the script I take command line inputs, validate them, apply sensible defaults
2. I also check if a few directories exist

The above are just two examples. I am trying to find out what is the best "strategy" to test this. What I have done is that I have constructed wrapper functions around `raw_input` and `os.path.exists` in my module and then in my test I override these two functions to take input from my array list or do some *mocked* behaviour. This approach has the following disadvantages

1. Wrapper functions just exist for the sake of testing and this pollutes the code
2. I have to remember to use the wrapper function in the code everytime and not just call `os.path.exists` or `raw_input`

Any brilliant suggestions?