Skip to content

Commit

Permalink
add test_width for PhononBandStructure
Browse files Browse the repository at this point in the history
  • Loading branch information
janosh committed Dec 20, 2023
1 parent ac38d65 commit 2b70e03
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/phonon/test_bandstructure.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,10 @@ def test_get_gamma_point(self):
assert isinstance(g_point, Kpoint)
assert list(g_point.frac_coords) == [0, 0, 0]
assert g_point.label in ("Gamma", "$\\Gamma$")

def test_width(self):
assert self.bs.width() == approx(7.4284347482)
assert self.bs2.width() == approx(15.2945892153)

assert self.bs.width(with_imaginary=False) == approx(7.3227137833)
assert self.bs2.width(with_imaginary=False) == approx(14.7108925878)

0 comments on commit 2b70e03

Please sign in to comment.