We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bfd0b0f commit fe48cbdCopy full SHA for fe48cbd
src/diffpy/structure/tests/testloadstructure.py
@@ -3,6 +3,7 @@
3
"""Unit tests for the loadStructure factory.
4
"""
5
6
+from pathlib import Path
7
import unittest
8
from diffpy.structure.tests.testutils import datafile
9
from diffpy.structure import loadStructure
@@ -41,6 +42,15 @@ def test_cif(self):
41
42
self.assertFalse(isinstance(stru, PDFFitStructure))
43
return
44
45
+ def test_cif_pathlib(self):
46
+ """check loading of CIF file format from pathlib.Path
47
+ """
48
+ f = datafile('PbTe.cif')
49
+ f = Path(f)
50
+ stru = loadStructure(f)
51
+ self.assertTrue(isinstance(stru, Structure))
52
+ self.assertFalse(isinstance(stru, PDFFitStructure))
53
+ return
54
55
def test_badfile(self):
56
"""check loading of CIF file format
0 commit comments