The with context are very powerful element of the python, this should be used wisely. I like it. One my main concern against massive with context usage is python 2.6. I need to use tempest with python 2.6 nowadays. In complex test case you would need to have more than 10 with. with .. with .. with .. with .. with .. with .. with .. with .. with .. with .. http://docs.python.org/2/whatsnew/2.7.html#python-3-1-features The syntactical sugar what usable in python 2.6 is similar to the one used by testresources.