Skip to content

Commit 569b7db

Browse files
authored
Merge pull request #27 from vincefn/master
Molecule and Crystal unit tests: always add the scattering power to the Crystal before the scatterer
2 parents 41b3e39 + 58a97f6 commit 569b7db

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/pyobjcryst/tests/pyobjcrysttestutils.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ def makeScattererAnisotropic():
3838

3939
def makeCrystal(sp, atom):
4040
c = Crystal(3.52, 3.52, 3.52, "225")
41-
c.AddScatterer(atom)
4241
c.AddScatteringPower(sp)
42+
c.AddScatterer(atom)
4343
return c
4444

4545
def getScatterer():
@@ -138,6 +138,8 @@ def makeMnO6():
138138
sp1.SetBiso(8*pi*pi*0.003)
139139
sp2 = ScatteringPowerAtom("O", "O")
140140
sp2.SetBiso(8*pi*pi*0.003)
141+
crystal.AddScatteringPower(sp1)
142+
crystal.AddScatteringPower(sp2)
141143

142144
m = MakeOctahedron(crystal, "MnO6", sp1, sp2, 0.5*a)
143145

src/pyobjcryst/tests/testcrystal.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ def testRemoveFunctions(self):
6666

6767
# You can add scatterers with the same name. That should be a no-no.
6868
sp2, atom2 = makeScatterer()
69-
c.AddScatterer(atom2)
7069
c.AddScatteringPower(sp2)
70+
c.AddScatterer(atom2)
7171

7272
# These act according to the library. You can try to remove an object
7373
# that is not in the crystal, and it will gladly do nothing for you.

0 commit comments

Comments
 (0)