Checking code for compatibility with Python 2 and 3
<p>Is there any automated way to test that code is compatible with both Python 2 and 3? I've seen plenty of documentation on how to write code that is compatible with both, but nothing on automatically checking. Basically a kind of linting for compatibility between versions rather than syntax/style.</p>

<p>I have thought of either running tests with both interpreters or running a tool like <code>six</code> or <code>2to3</code> and checking that nothing is output; unfortunately, the former requires that you have 100% coverage with your tests and I would assume the latter requires that you have valid Python 2 code and would only pick up issues in compatibility with Python 3.</p>

<p>Is there anything out there that will accomplish this task?</p>