diff --git a/news/use-string-in-structure b/news/use-string-in-structure new file mode 100644 index 0000000..da1c8a0 --- /dev/null +++ b/news/use-string-in-structure @@ -0,0 +1,23 @@ +**Added:** + +* No news added: Use filename string instead of pathlib.Path to fix the test using ``diffpy.structure``. + +**Changed:** + +* + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* + +**Security:** + +* diff --git a/tests/test_pdf.py b/tests/test_pdf.py index 929b16e..c6cffd1 100644 --- a/tests/test_pdf.py +++ b/tests/test_pdf.py @@ -160,7 +160,8 @@ def testGenerator( stru = PDFFitStructure() ciffile = datafile("ni.cif") - stru.read(ciffile) + cif_path = str(ciffile) + stru.read(cif_path) for i in range(4): stru[i].Bisoequiv = 1 gen.setStructure(stru) @@ -298,7 +299,9 @@ def test_pickling( pc = PDFContribution("pdf") pc.loadData(datafile("ni-q27r100-neutron.gr")) - ni = loadStructure(datafile("ni.cif")) + ciffile = datafile("ni.cif") + cif_path = str(ciffile) + ni = loadStructure(cif_path) ni.Uisoequiv = 0.003 pc.addStructure("ni", ni) pc.setCalculationRange(0, 10)