File: test_exception.py

package info (click to toggle)
phonopy 2.44.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 29,136 kB
  • sloc: python: 42,934; xml: 12,080; ansic: 3,227; cpp: 525; sh: 213; makefile: 20
file content (14 lines) | stat: -rw-r--r-- 395 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
"""Tests of custom exceptions."""

import pytest

from phonopy import Phonopy
from phonopy.exception import ForcesetsNotFoundError


def test_ForcesetsNotFoundError(nacl_unitcell_order1: Phonopy):
    """Test of ForcesetsNotFoundError."""
    ph = Phonopy(nacl_unitcell_order1)
    ph.generate_displacements()
    with pytest.raises(ForcesetsNotFoundError):
        ph.produce_force_constants()