Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kavanase committed Jun 3, 2024
1 parent ab4be67 commit a818ea8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
#######################################################
#CASTEP cell file: /home/ireaml/Python_Modules/vac_1_Cd_0/Bond_Distortion_30.0%/castep.cell
#Created using the Atomic Simulation Environment (ASE)#
#######################################################
# written by ASE

%BLOCK LATTICE_CART
13.086768 0.000000 0.000000
Expand Down Expand Up @@ -75,5 +72,3 @@ Te 11.559529 11.895370 4.746923
Te 11.072262 11.648637 11.378040
%ENDBLOCK POSITIONS_ABS

KPOINT_MP_GRID: 1 1 1
KPOINT_MP_OFFSET: 0.000000 0.000000 0.000000
4 changes: 1 addition & 3 deletions tests/test_energy_lowering_distortions.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import numpy as np
from monty.serialization import dumpfn, loadfn
from pymatgen.core.structure import Structure
from pymatgen.io.ase import AseAtomsAdaptor

from shakenbreak import analysis, distortions, energy_lowering_distortions, io

Expand Down Expand Up @@ -1063,8 +1062,7 @@ def test_write_retest_inputs(self):
"r",
) as f:
atoms = ase.io.espresso.read_espresso_in(f)
aaa = AseAtomsAdaptor()
struct = aaa.get_structure(atoms)
struct = Structure.from_ase_atoms(atoms)
self.assertTrue(analysis._calculate_atomic_disp(struct, self.V_Cd_minus_0pt55_structure)[0] < 0.01)

# Test copying over FHI-aims input files when the input files are only
Expand Down
12 changes: 4 additions & 8 deletions tests/test_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -2830,8 +2830,7 @@ def test_write_vasp_files_from_list(self):
self.assertFalse(os.path.exists("v_Te_Td_Cd2.83_+4"))
self.tearDown()

@patch("builtins.print")
def test_write_espresso_files(self, mock_print):
def test_write_espresso_files(self):
"""Test method write_espresso_files"""
oxidation_states = {"Cd": +2, "Te": -2}
bond_distortions = [
Expand Down Expand Up @@ -2909,8 +2908,7 @@ def test_write_espresso_files(self, mock_print):
# The input_file option is tested through the test for `generate_all()`
# (in `test_cli.py`)

@patch("builtins.print")
def test_write_cp2k_files(self, mock_print):
def test_write_cp2k_files(self):
"""Test method write_cp2k_files"""
oxidation_states = {"Cd": +2, "Te": -2}
bond_distortions = [
Expand Down Expand Up @@ -2984,8 +2982,7 @@ def test_write_cp2k_files(self, mock_print):
# The input_file option is tested through the test for `generate_all()`
# (in `test_cli.py`)

@patch("builtins.print")
def test_write_castep_files(self, mock_print):
def test_write_castep_files(self):
"""Test method write_castep_files"""
oxidation_states = {"Cd": +2, "Te": -2}
bond_distortions = [
Expand Down Expand Up @@ -3057,8 +3054,7 @@ def test_write_castep_files(self, mock_print):
# The input_file option is tested through the test for `generate_all()`
# (in `test_cli.py`)

@patch("builtins.print")
def test_write_fhi_aims_files(self, mock_print):
def test_write_fhi_aims_files(self):
"""Test method write_fhi_aims_files"""
oxidation_states = {"Cd": +2, "Te": -2}
bond_distortions = [
Expand Down

0 comments on commit a818ea8

Please sign in to comment.