diff options
Diffstat (limited to 'tests/test_propagation.py')
-rw-r--r-- | tests/test_propagation.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/test_propagation.py b/tests/test_propagation.py index bf886bd..8f9d084 100644 --- a/tests/test_propagation.py +++ b/tests/test_propagation.py @@ -34,10 +34,12 @@ class TestPropagation(unittest.TestCase): wavelengths = np.empty(nphotons, np.float32) wavelengths.fill(400.0) - photons = Photons(pos=pos, dir=dir, pol=pol, t=t, wavelengths=wavelengths) + photons = Photons(pos=pos, dir=dir, pol=pol, t=t, + wavelengths=wavelengths) # First make one step to check for strangeness - photons_end = sim.simulate([photons], keep_photons_end=True, max_steps=1).next().photons_end + photons_end = sim.simulate([photons], keep_photons_end=True, + max_steps=1).next().photons_end self.assertFalse(np.isnan(photons_end.pos).any()) self.assertFalse(np.isnan(photons_end.dir).any()) @@ -46,8 +48,10 @@ class TestPropagation(unittest.TestCase): self.assertFalse(np.isnan(photons_end.wavelengths).any()) # Now let it run the usual ten steps - photons_end = sim.simulate([photons], keep_photons_end=True, max_steps=10).next().photons_end + photons_end = sim.simulate([photons], keep_photons_end=True, + max_steps=10).next().photons_end aborted = (photons_end.flags & (1 << 31)) > 0 - print 'aborted photons: %1.1f' % (float(np.count_nonzero(aborted)) / nphotons) + print 'aborted photons: %1.1f' % \ + (float(np.count_nonzero(aborted)) / nphotons) self.assertFalse(aborted.any()) |