Some cleanup and docs for pytest (bug 1090184)