Created
June 7, 2013 13:04
-
-
Save cdeil/5729097 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ py.test barak | |
========================================================================================================= test session starts ========================================================================================================= | |
platform darwin -- Python 2.7.5 -- pytest-2.3.5 | |
plugins: cov | |
collected 16 items / 5 errors | |
barak/tests/test_coord.py ... | |
barak/tests/test_interp.py ... | |
barak/tests/test_pyvpfit.py .F | |
barak/tests/test_utilities.py ..... | |
barak/tests/test_virial.py . | |
barak/tests/test_voigt.py .. | |
=============================================================================================================== ERRORS ================================================================================================================ | |
_____________________________________________________________________________________________ ERROR collecting barak/tests/test_absorb.py _____________________________________________________________________________________________ | |
../../Library/Python/2.7/lib/python/site-packages/_pytest/python.py:352: in _importtestmodule | |
> mod = self.fspath.pyimport(ensuresyspath=True) | |
../../Library/Python/2.7/lib/python/site-packages/py/_path/local.py:548: in pyimport | |
> __import__(modname) | |
../../Library/Python/2.7/lib/python/site-packages/_pytest/assertion/rewrite.py:159: in load_module | |
> py.builtin.exec_(co, mod.__dict__) | |
barak/tests/test_absorb.py:1: in <module> | |
> from ..absorb import * | |
barak/absorb.py:17: in <module> | |
> from .convolve import convolve_psf | |
barak/convolve.py:8: in <module> | |
> from .sed import make_constant_dv_wa_scale | |
E File "/Users/deil/code/Barak/barak/sed.py", line 98 | |
E class Passband(object): | |
E ^ | |
E SyntaxError: invalid syntax | |
____________________________________________________________________________________________ ERROR collecting barak/tests/test_convolve.py ____________________________________________________________________________________________ | |
../../Library/Python/2.7/lib/python/site-packages/_pytest/python.py:352: in _importtestmodule | |
> mod = self.fspath.pyimport(ensuresyspath=True) | |
../../Library/Python/2.7/lib/python/site-packages/py/_path/local.py:548: in pyimport | |
> __import__(modname) | |
../../Library/Python/2.7/lib/python/site-packages/_pytest/assertion/rewrite.py:159: in load_module | |
> py.builtin.exec_(co, mod.__dict__) | |
barak/tests/test_convolve.py:1: in <module> | |
> from ..convolve import * | |
barak/convolve.py:8: in <module> | |
> from .sed import make_constant_dv_wa_scale | |
E File "/Users/deil/code/Barak/barak/sed.py", line 98 | |
E class Passband(object): | |
E ^ | |
E SyntaxError: invalid syntax | |
____________________________________________________________________________________________ ERROR collecting barak/tests/test_fitcont.py _____________________________________________________________________________________________ | |
../../Library/Python/2.7/lib/python/site-packages/_pytest/python.py:352: in _importtestmodule | |
> mod = self.fspath.pyimport(ensuresyspath=True) | |
../../Library/Python/2.7/lib/python/site-packages/py/_path/local.py:548: in pyimport | |
> __import__(modname) | |
../../Library/Python/2.7/lib/python/site-packages/_pytest/assertion/rewrite.py:159: in load_module | |
> py.builtin.exec_(co, mod.__dict__) | |
barak/tests/test_fitcont.py:1: in <module> | |
> from ..fitcont import * | |
barak/fitcont.py:17: in <module> | |
> from .convolve import convolve_psf | |
barak/convolve.py:8: in <module> | |
> from .sed import make_constant_dv_wa_scale | |
E File "/Users/deil/code/Barak/barak/sed.py", line 98 | |
E class Passband(object): | |
E ^ | |
E SyntaxError: invalid syntax | |
______________________________________________________________________________________________ ERROR collecting barak/tests/test_sed.py _______________________________________________________________________________________________ | |
../../Library/Python/2.7/lib/python/site-packages/_pytest/python.py:352: in _importtestmodule | |
> mod = self.fspath.pyimport(ensuresyspath=True) | |
../../Library/Python/2.7/lib/python/site-packages/py/_path/local.py:548: in pyimport | |
> __import__(modname) | |
../../Library/Python/2.7/lib/python/site-packages/_pytest/assertion/rewrite.py:159: in load_module | |
> py.builtin.exec_(co, mod.__dict__) | |
barak/tests/test_sed.py:1: in <module> | |
> from ..sed import * | |
E File "/Users/deil/code/Barak/barak/sed.py", line 98 | |
E class Passband(object): | |
E ^ | |
E SyntaxError: invalid syntax | |
______________________________________________________________________________________________ ERROR collecting barak/tests/test_spec.py ______________________________________________________________________________________________ | |
../../Library/Python/2.7/lib/python/site-packages/_pytest/python.py:352: in _importtestmodule | |
> mod = self.fspath.pyimport(ensuresyspath=True) | |
../../Library/Python/2.7/lib/python/site-packages/py/_path/local.py:548: in pyimport | |
> __import__(modname) | |
../../Library/Python/2.7/lib/python/site-packages/_pytest/assertion/rewrite.py:159: in load_module | |
> py.builtin.exec_(co, mod.__dict__) | |
barak/tests/test_spec.py:1: in <module> | |
> from ..spec import * | |
barak/spec.py:21: in <module> | |
> from .convolve import convolve_psf | |
barak/convolve.py:8: in <module> | |
> from .sed import make_constant_dv_wa_scale | |
E File "/Users/deil/code/Barak/barak/sed.py", line 98 | |
E class Passband(object): | |
E ^ | |
E SyntaxError: invalid syntax | |
============================================================================================================== FAILURES =============================================================================================================== | |
____________________________________________________________________________________________________________ test_calc_v90 ____________________________________________________________________________________________________________ | |
def test_calc_v90(): | |
> assert np.allclose(calc_v90(vp), 381.5) | |
barak/tests/test_pyvpfit.py:49: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
vp = VpfitModel(lines, regions, stats), plot = False, z0 = None, wav0 = 1215.6701, osc = 0.4164, gam = 626500000.0 | |
def calc_v90(vp, plot=False, z0=None, | |
wav0=1215.6701, osc=0.4164, gam=6.265e8): | |
""" For a vp model, we want to calculate the velocity width that | |
contains 90% of the the total optical depth at the lya line (or | |
perhaps it is the same regardless of which transition I take?) v_90 | |
is defined in Prochaska and Wolfe 1997. | |
At the moment it guesses how big a velocity range it has to | |
calculate the optical depth over - a bit dodgy""" | |
> from .absorb import calctau | |
barak/pyvpfit.py:338: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
""" | |
# p2.6+ compatibility | |
from __future__ import division | |
from __future__ import print_function | |
from __future__ import unicode_literals | |
import sys | |
if sys.version > '3': | |
from io import StringIO | |
basestring = str | |
else: | |
from cStringIO import StringIO | |
from .voigt import voigt | |
> from .convolve import convolve_psf | |
barak/absorb.py:17: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
""" Functions related to convolution.""" | |
# py2.6+ compatibility | |
from __future__ import division, print_function, unicode_literals | |
import numpy as np | |
from .utilities import nan2num | |
> from .sed import make_constant_dv_wa_scale | |
E File "/Users/deil/code/Barak/barak/sed.py", line 98 | |
E class Passband(object): | |
E ^ | |
E SyntaxError: invalid syntax | |
barak/convolve.py:8: SyntaxError | |
============================================================================================ 1 failed, 15 passed, 5 error in 2.06 seconds ============================================================================================= |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for opening this issue! I just committed the setup.py fix.
I'm not sure what's causing the syntax errors - I can't reproduce them on my linux machine using Python 2.7.3, and a quick Google search hasn't turned up anything. I'll try to see what the problem is when I get some more free time.