Skip to content

Commit

Permalink
add TestPeriodicSite.test_str()
Browse files Browse the repository at this point in the history
  • Loading branch information
janosh committed Oct 20, 2023
1 parent 9a69637 commit 76461a1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/core/test_sites.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,12 @@ def test_repr(self):
assert repr(self.propertied_site) == "PeriodicSite: Fe2+ (2.5, 3.5, 4.5) [0.25, 0.35, 0.45]"
assert repr(self.labeled_site) == "PeriodicSite: site label (Fe) (2.5, 3.5, 4.5) [0.25, 0.35, 0.45]"

def test_str(self):
assert str(self.site) == "[2.5 3.5 4.5] Fe"
assert str(self.site2) == "[0. 0. 0.] Si:0.500"
assert str(self.propertied_site) == "[2.5 3.5 4.5] Fe2+"
assert str(self.labeled_site) == "[2.5 3.5 4.5] Fe"


def get_distance_and_image_old(site1, site2, jimage=None):
"""
Expand Down

0 comments on commit 76461a1

Please sign in to comment.