Skip to content

Commit 778b492

Browse files
committed
TST: cover failure when Atom.occupancy is np.int64
1 parent f478e0c commit 778b492

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

src/diffpy/srreal/tests/teststructureadapter.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,17 @@ def test_createStructureAdapterTypes(self):
6060
self.assertTrue(type(adpt3) is DiffPyStructureAtomicAdapter)
6161
return
6262

63+
@unittest.expectedFailure
64+
def test_createStructureAdapter_int64_occupancy(self):
65+
"""Check Structure conversion when occupany is of numpy.int64 type.
66+
"""
67+
self.nickel[0].occupancy = numpy.int64(0)
68+
self.nickel[1].occupancy = numpy.int64(1)
69+
adpt = createStructureAdapter(self.nickel)
70+
self.assertEqual(0.0, adpt.siteOccupancy(0))
71+
self.assertEqual(1.0, adpt.siteOccupancy(1))
72+
return
73+
6374
def test_pickling(self):
6475
'''check pickling of StructureAdapter instances.
6576
'''

0 commit comments

Comments
 (0)