Skip to content

Commit 5aa7ddb

Browse files
committed
Changed variable name of assertion to Xoffset
1 parent 7a3d4d8 commit 5aa7ddb

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

01_element/test_lhcdipole.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ def test() :
1515
# secondary aperture and outside of the secondary aperture (yoke)
1616
listX0 = [0,19.4,19.4]
1717
listY0 = [0,0,4]
18-
listAssert = [1.9062219,-0.1165236,-0.1521038]
18+
listXoffset = [1.9062219,-0.1165236,-0.1521038]
1919

20-
for i in range(len(listAssert)):
20+
for i in range(len(listXoffset)):
2121

22-
X0,Y0,assertion = listX0[i],listY0[i],listAssert[i]
22+
X0,Y0,Xoffset = listX0[i],listY0[i],listXoffset[i]
2323

2424
data = {
2525
'X0': str(X0),
@@ -32,4 +32,4 @@ def test() :
3232
d = pybdsim.DataPandas.BDSIMOutput(root_name)
3333
s = d.get_sampler("sampler.")
3434

35-
assert(s['x'][0] == pytest.approx(assertion, rel=1e-4))
35+
assert(s['x'][0] == pytest.approx(Xoffset, rel=1e-4))

01_element/test_lhcquadrupole.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ def test() :
1515
# secondary aperture and outside of the secondary aperture (yoke)
1616
listX0 = [1,20.4,23.4]
1717
listY0 = [1,1,4]
18-
listAssert = [-0.0198441,0.1741561,0.2050054]
18+
listXoffset = [-0.0198441,0.1741561,0.2050054]
1919

20-
for i in range(len(listAssert)):
20+
for i in range(len(listXoffset)):
2121

22-
X0,Y0,assertion = listX0[i],listY0[i],listAssert[i]
22+
X0,Y0,Xoffset = listX0[i],listY0[i],listXoffset[i]
2323

2424
data = {
2525
'X0': str(X0),
@@ -32,4 +32,4 @@ def test() :
3232
d = pybdsim.DataPandas.BDSIMOutput(root_name)
3333
s = d.get_sampler("sampler.")
3434

35-
assert(s['x'][0] == pytest.approx(assertion, rel=1e-4))
35+
assert(s['x'][0] == pytest.approx(Xoffset, rel=1e-4))

0 commit comments

Comments
 (0)