Explicitly use os.linesep in the expected value since that's what's used by the writer code
Just use a common random seed.  Some of these tests (particularly the ones using 0xDEADBEEF as a seed) were being hit by a common bug in some versions of Numpy where Python long objects (which a value like 0xDEADBEEF is converted to on 32-bit systems) are not handled properly by Numpy since it can't guarantee they will fit into a machine integer type
This test wasn't actually making using use of the parametrization; though one of the fitters seems to be failing badly on Win32...
Use a smaller sigma for the random noise in these tests which for now seems to prevent the slsqp fitter from going too far off the reservation (see https://github.com/astropy/astropy/issues/2670)
The float comparison code was excluding the exponent and only comparing the mantissa, which seems odd to me especially in cases that are essentially zero.  This includes the exponent in the values to be compared, for now.
Windows is a lot pickier (at least on Python 2) about unicode values in environment variable dicts passed to subprocess.  Also make sure to use os.pathsep when setting PYTHONPATH
These macros are necessary to build modules that use the WCS API on Windows.  It's unfortunate that this needs to be specified manually, but that does the trick for now
Fix a few more instances of the tests setting unicode environment variables.  It's unclear to me how monkeypatch was causing issues with this, which I fear might be a subtle bug in pytest.  But this gets the job done for now.
These calls to np.fromstring were bugging out on Python 3.1, very strangely.  But bugs in Numpy on Python 3.1 are nothing new, and there was no longer any need for the np.fromstring call there, so this is fine for now.
Workaround for a strange issue. check_call was returning an error code of 1, but only when called from within py.test. I found that redirecting the output caused the issue to go away, so I suspect this was a strange interaction with py.test's output capturer. No time to investigate any further for now, given this workaround. But maybe in the future.
Followup to e993608
Merge pull request #2672 from embray/win32-fixes

Win32 fixes