Add a simple test for #1092

Also, some minor PEP 8 fixes.