Sorry for clobbering the test: the idea is that psycopg2_tests is only a copy of the upstream tests. If you want tests customized for -cffi you can put somewhere else under tests/. However if this snippet is useful for any implementation I'll merge it upstream. Don't bother opening a pull request, I'll do myself.