pyca/cryptography — pull request #1130 by dreid (2014-06-13 17:27:45+00:00)
Title: Attempt to better isolate this test by getting the backend name from a subprocess.

This is an alternate strategy to address the concerns raised in #1075.

It runs a short script that simply writes the name of the default RAND engine to stdout then the test compares that with the expected engine name.

We do the assertion in the test so it produces a better message, if the process exits non-zero for any reason the output is rather ugly but if the name just didn't match then you get reasonable output. This appears to work fine in both tox and using py.test directly in a virtualenv.

I have no idea if it'll work properly on windows.