Skip to content

Commit

Permalink
add IStructureTest.test_sites_setter
Browse files Browse the repository at this point in the history
  • Loading branch information
janosh committed Jul 31, 2023
1 parent c5052a2 commit 28a895f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pymatgen/core/tests/test_structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,12 @@ def test_pbc(self):
assert_array_equal(struct_pbc.pbc, (True, True, False))
assert not struct_pbc.is_3d_periodic

def test_sites_setter(self):
struct = self.struct.copy()
new_sites = struct.sites[::-1] # reverse order of sites
struct.sites = new_sites
assert struct.sites == new_sites


class StructureTest(PymatgenTest):
def setUp(self):
Expand Down

0 comments on commit 28a895f

Please sign in to comment.