Skip to content

Commit a2d280a

Browse files
committed
chore: redo error messages for source code and pytest skips
1 parent 5854969 commit a2d280a

2 files changed

Lines changed: 30 additions & 8 deletions

File tree

src/diffpy/srfit/pdf/characteristicfunctions.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -415,11 +415,9 @@ 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.
421418
raise NotImplementedError(
422-
"calculate_ER() is not implemented in sasmodels"
419+
"As of release 3.2.0, these are not working but we hope to have "
420+
+ "them working again in a future release."
423421
)
424422

425423
dr = min(0.01, r[1] - r[0])

tests/test_characteristicfunctions.py

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

3333

3434
def testSphere(sas_available):
35-
pytest.skip("calculate_ER() not available")
35+
# if not sas_available:
36+
# pytest.skip("sas package not available")
37+
pytest.skip(
38+
"sas characteristic functions not currently working, "
39+
+ "remove skip when our code is refactored to use the "
40+
+ "latest sasview API"
41+
)
3642
radius = 25
3743
# Calculate sphere cf from SphereModel
3844
SphereModel = find_model("sphere")
@@ -52,7 +58,13 @@ def testSphere(sas_available):
5258

5359

5460
def testSpheroid(sas_available):
55-
pytest.skip("calculate_ER() not available")
61+
# if not sas_available:
62+
# pytest.skip("sas package not available")
63+
pytest.skip(
64+
"sas characteristic functions not currently working, "
65+
+ "remove skip when our code is refactored to use the "
66+
+ "latest sasview API"
67+
)
5668
prad = 20.9
5769
erad = 33.114
5870
# Calculate cf from EllipsoidModel
@@ -74,7 +86,13 @@ def testSpheroid(sas_available):
7486

7587

7688
def testShell(sas_available):
77-
pytest.skip("calculate_ER() not available")
89+
# if not sas_available:
90+
# pytest.skip("sas package not available")
91+
pytest.skip(
92+
"sas characteristic functions not currently working, "
93+
+ "remove skip when our code is refactored to use the "
94+
+ "latest sasview API"
95+
)
7896
radius = 19.2
7997
thickness = 7.8
8098
# Calculate cf from VesicleModel
@@ -96,7 +114,13 @@ def testShell(sas_available):
96114

97115

98116
def testCylinder(sas_available):
99-
pytest.skip("calculate_ER() not available")
117+
# if not sas_available:
118+
# pytest.skip("sas package not available")
119+
pytest.skip(
120+
"sas characteristic functions not currently working, "
121+
+ "remove skip when our code is refactored to use the "
122+
+ "latest sasview API"
123+
)
100124
"""Make sure cylinder works over different r-ranges."""
101125
radius = 100
102126
length = 30

0 commit comments

Comments
 (0)