Closed weaverba137 closed 6 years ago
It looks like I'm also going to have to fix the doctest in atmosphere.py.
I had to fix a couple of unrelated things to get tests to pass. @sbailey or @dkirkby, you might want to review this again.
I hadn't realized how complicated my "could you open a PR about that?" would be. Thanks for the debugging and chasing this one down. Nicely done. I independently confirmed that tests pass without $DISPLAY
set with astropy 2. Thanks.
As reported by @sbailey, when running
python setup.py test
with astropy 2.x and with the$DISPLAY
variable unset, multiple errors were reported. The cause turned out to be in fitgalsim.py, which imported matplotlib at the top level, without settingmatplotlib.use('Agg')
.It turns out that fitgalsim.py does not actually use matplotlib at all, so the solution was to remove the import entirely.
Technical note: The reason this is a problem in astropy 2.x is that astropy 2.x scans (imports) all files for tests (specifically doctests), not just the
specsim/tests/test_*.py
files.