sympy/sympy — pull request #1379 by asmeurer (2012-06-23 06:45:53+00:00)
Title: Test subprocess

This enables testing with hash randomization. Hash randomization is a new feature of Python where hash values are randomized, so as to prevent against a hash collision security issue. It causes many test failures (see [issue 3272](http://code.google.com/p/sympy/issues/detail?id=3272)) because so many operations in SymPy are hash dependent (in particular, the ordering of .args in Add and Mul).

Hash randomization will be enabled by default in Python 3.3, so this is important. Because the only way to get the hash seed is to set it first, and the only way to set it is to set an environment variable before starting Python, we have to start a new subprocess to test this. A new subprocess is started only when necessary, and can be disabled (see the commit messages and the added docstrings for more information). If anyone knows of a better way, please let me know, but this seems to work quite well to me.

An important note: the bot tests for this pull request are going to have failures. That's a good thing. It means that it's working. The test failures are related to hash randomization (all of them are, since tests are currently all passing in master). My hope is that by getting this in, I can start to draw attention to these failures and get them fixed. Of course, if you think any of the failures are actually caused by the changes in this request, please let me know.