Skip to content

Commit 5854969

Browse files
committed
chore: skip characteristic function tests, add fixme to tolerances and characteristicfunctions.py
1 parent c68f981 commit 5854969

3 files changed

Lines changed: 13 additions & 8 deletions

File tree

src/diffpy/srfit/pdf/characteristicfunctions.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,13 @@ def __call__(self, r):
415415
#
416416
# We also have to make a q-spacing small enough to compute out to at
417417
# least the size of the signal.
418+
419+
# As of release 3.2.0, these are not working but we hope to have
420+
# them working again in a future release.
421+
raise NotImplementedError(
422+
"calculate_ER() is not implemented in sasmodels"
423+
)
424+
418425
dr = min(0.01, r[1] - r[0])
419426
ed = 2 * self._model.calculate_ER()
420427

tests/test_characteristicfunctions.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@
3232

3333

3434
def testSphere(sas_available):
35-
if not sas_available:
36-
pytest.skip("sas package not available")
35+
pytest.skip("calculate_ER() not available")
3736
radius = 25
3837
# Calculate sphere cf from SphereModel
3938
SphereModel = find_model("sphere")
@@ -53,8 +52,7 @@ def testSphere(sas_available):
5352

5453

5554
def testSpheroid(sas_available):
56-
if not sas_available:
57-
pytest.skip("sas package not available")
55+
pytest.skip("calculate_ER() not available")
5856
prad = 20.9
5957
erad = 33.114
6058
# Calculate cf from EllipsoidModel
@@ -76,8 +74,7 @@ def testSpheroid(sas_available):
7674

7775

7876
def testShell(sas_available):
79-
if not sas_available:
80-
pytest.skip("sas package not available")
77+
pytest.skip("calculate_ER() not available")
8178
radius = 19.2
8279
thickness = 7.8
8380
# Calculate cf from VesicleModel
@@ -99,8 +96,7 @@ def testShell(sas_available):
9996

10097

10198
def testCylinder(sas_available):
102-
if not sas_available:
103-
pytest.skip("sas package not available")
99+
pytest.skip("calculate_ER() not available")
104100
"""Make sure cylinder works over different r-ranges."""
105101
radius = 100
106102
length = 30

tests/test_sas.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,5 +166,7 @@ def testGenerator2(sas_available, datafile):
166166
y = gen(profile.xobs)
167167
diff = profile.yobs - y
168168
res = numpy.dot(diff, diff)
169+
# FIXME: go back to default tolerance when we figure out why
170+
# the models are not identical
169171
assert 0 == pytest.approx(res, abs=1e-3)
170172
return

0 commit comments

Comments
 (0)