lbolla / EMpy

Electromagnetic Python
MIT License
194 stars 83 forks source link

Tests for `materials.RefractiveIndex` + update to `RefractiveIndex.__from_func()` #2

Closed demisjohn closed 8 years ago

demisjohn commented 8 years ago

Added tests for each argument type of RefractiveIndex class, in the file materials_test.py: all tests passed upon running python3.5 setup.py test.

In the process, realized that __from_func() doesn't return an np.array, as all the other funcs do (proving the utility of writing such tests!), so updated RefractiveIndex.__from_func() to convert wls to an np.array.

lbolla commented 8 years ago

Thanks! Can you please PEP8-ify your code? EMpy strives to be PEP8 compliant as strictly as possible. https://www.python.org/dev/peps/pep-0008/ You can use autopep8 (https://pypi.python.org/pypi/autopep8) to automatically correct PEP8 violations, if you want.

lbolla commented 8 years ago

Thanks and sorry for the long long wait.