Skip to content

Commit 0752ce9

Browse files
committed
test: use filename string instead of pathlib.Path to fix tests using diffpy.structure
1 parent b94a3a9 commit 0752ce9

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

news/use-string-in-structure

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
**Added:**
2+
3+
* No news added: Use filename string instead of pathlib.Path to fix the test using ``diffpy.structure``.
4+
5+
**Changed:**
6+
7+
* <news item>
8+
9+
**Deprecated:**
10+
11+
* <news item>
12+
13+
**Removed:**
14+
15+
* <news item>
16+
17+
**Fixed:**
18+
19+
* <news item>
20+
21+
**Security:**
22+
23+
* <news item>

tests/test_pdf.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ def testGenerator(
160160

161161
stru = PDFFitStructure()
162162
ciffile = datafile("ni.cif")
163+
ciffile = str(ciffile)
163164
stru.read(ciffile)
164165
for i in range(4):
165166
stru[i].Bisoequiv = 1
@@ -298,7 +299,9 @@ def test_pickling(
298299

299300
pc = PDFContribution("pdf")
300301
pc.loadData(datafile("ni-q27r100-neutron.gr"))
301-
ni = loadStructure(datafile("ni.cif"))
302+
ciffile = datafile("ni.cif")
303+
ciffile = str(ciffile)
304+
ni = loadStructure(ciffile)
302305
ni.Uisoequiv = 0.003
303306
pc.addStructure("ni", ni)
304307
pc.setCalculationRange(0, 10)

0 commit comments

Comments
 (0)