Summary: This makes the test compatible with Python 2, 3 and Windows. It also looks easier to read. Reviewed By: xavierd Differential Revision: D20444919 fbshipit-source-id: c897e9abc8a5d6d98ff1fc526e2484720fb73bb1