Skip to content

Commit

Permalink
FIX: only test atoms for which scattering parameters are available
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentRDC committed Jun 21, 2017
1 parent 3f3dea4 commit 90e114b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions skued/structure/tests/test_atom.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import numpy as np
from .. import Atom, atomic_number
import unittest

seed(23)

ELEMENTS = list(atomic_number.keys())
Expand All @@ -16,7 +15,8 @@ def test_electron_form_factor_side_effects(self):
nG = np.random.random(size = (256,))
copied = np.copy(nG)

a = Atom(choice(ELEMENTS), [0,0,0])
# There are no scattering parameters for elements Z > 103
a = Atom(choice([e for e in ELEMENTS if atomic_number[e] < 104]), [0,0,0])
_ = a.electron_form_factor(nG)

self.assertTrue(np.allclose(nG, copied))

0 comments on commit 90e114b

Please sign in to comment.