Skip to content

Commit

Permalink
global replace PymatgenTest import
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielYang59 committed Dec 4, 2024
1 parent 98f7fc7 commit dfb616c
Show file tree
Hide file tree
Showing 37 changed files with 39 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import json

from pymatgen.analysis.chemenv.connectivity.environment_nodes import EnvironmentNode
from pymatgen.util.testing import PymatgenTest
from pymatgen.util.testing import MatSciTest

try:
import bson
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
DistanceCutoffFloat,
SimplestChemenvStrategy,
)
from pymatgen.util.testing import PymatgenTest
from pymatgen.util.testing import MatSciTest

__author__ = "waroquiers"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
ExplicitPermutationsAlgorithm,
SeparationPlane,
)
from pymatgen.util.testing import PymatgenTest
from pymatgen.util.testing import MatSciTest

__author__ = "waroquiers"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from pytest import approx

from pymatgen.analysis.chemenv.utils.coordination_geometry_utils import Plane
from pymatgen.util.testing import PymatgenTest
from pymatgen.util.testing import MatSciTest

__author__ = "David Waroquiers"

Expand Down
2 changes: 1 addition & 1 deletion tests/analysis/chemenv/utils/test_graph_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from pymatgen.analysis.chemenv.connectivity.environment_nodes import EnvironmentNode
from pymatgen.analysis.chemenv.utils.graph_utils import MultiGraphCycle, SimpleGraphCycle, get_delta
from pymatgen.util.testing import PymatgenTest
from pymatgen.util.testing import MatSciTest

__author__ = "waroquiers"

Expand Down
2 changes: 1 addition & 1 deletion tests/analysis/chemenv/utils/test_math_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
smootherstep,
smoothstep,
)
from pymatgen.util.testing import PymatgenTest
from pymatgen.util.testing import MatSciTest

__author__ = "waroquiers"

Expand Down
2 changes: 1 addition & 1 deletion tests/analysis/diffraction/test_neutron.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from pymatgen.analysis.diffraction.neutron import NDCalculator
from pymatgen.core.lattice import Lattice
from pymatgen.core.structure import Structure
from pymatgen.util.testing import PymatgenTest
from pymatgen.util.testing import MatSciTest

"""
These calculated values were verified with VESTA and FullProf.
Expand Down
2 changes: 1 addition & 1 deletion tests/analysis/diffraction/test_tem.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from pymatgen.analysis.diffraction.tem import TEMCalculator
from pymatgen.core.lattice import Lattice
from pymatgen.core.structure import Structure
from pymatgen.util.testing import PymatgenTest
from pymatgen.util.testing import MatSciTest

__author__ = "Frank Wan, Jason Liang"
__copyright__ = "Copyright 2019, The Materials Project"
Expand Down
2 changes: 1 addition & 1 deletion tests/analysis/diffraction/test_xrd.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from pymatgen.analysis.diffraction.xrd import XRDCalculator
from pymatgen.core.lattice import Lattice
from pymatgen.core.structure import Structure
from pymatgen.util.testing import PymatgenTest
from pymatgen.util.testing import MatSciTest

__author__ = "Shyue Ping Ong"
__copyright__ = "Copyright 2012, The Materials Project"
Expand Down
2 changes: 1 addition & 1 deletion tests/analysis/elasticity/test_strain.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from pymatgen.analysis.elasticity.strain import Deformation, DeformedStructureSet, Strain, convert_strain_to_deformation
from pymatgen.core.structure import Structure
from pymatgen.core.tensors import Tensor
from pymatgen.util.testing import PymatgenTest
from pymatgen.util.testing import MatSciTest


class TestDeformation(MatSciTest):
Expand Down
2 changes: 1 addition & 1 deletion tests/analysis/elasticity/test_stress.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from pymatgen.analysis.elasticity.strain import Deformation
from pymatgen.analysis.elasticity.stress import Stress
from pymatgen.util.testing import PymatgenTest
from pymatgen.util.testing import MatSciTest


class TestStress(MatSciTest):
Expand Down
2 changes: 1 addition & 1 deletion tests/analysis/interfaces/test_coherent_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from pymatgen.core.lattice import Lattice
from pymatgen.core.structure import Structure
from pymatgen.symmetry.analyzer import SpacegroupAnalyzer
from pymatgen.util.testing import PymatgenTest
from pymatgen.util.testing import MatSciTest


class TestInterfaceBuilder(MatSciTest):
Expand Down
6 changes: 3 additions & 3 deletions tests/analysis/interfaces/test_substrate_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
from pymatgen.analysis.elasticity.elastic import ElasticTensor
from pymatgen.analysis.interfaces.substrate_analyzer import SubstrateAnalyzer
from pymatgen.symmetry.analyzer import SpacegroupAnalyzer
from pymatgen.util.testing import PymatgenTest
from pymatgen.util.testing import MatSciTest

VO2 = PymatgenTest.get_structure("VO2")
TiO2 = PymatgenTest.get_structure("TiO2")
VO2 = MatSciTest.get_structure("VO2")
TiO2 = MatSciTest.get_structure("TiO2")

# Film VO2
film = SpacegroupAnalyzer(VO2, symprec=0.1).get_conventional_standard_structure()
Expand Down
2 changes: 1 addition & 1 deletion tests/analysis/interfaces/test_zsl.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
vec_area,
)
from pymatgen.symmetry.analyzer import SpacegroupAnalyzer
from pymatgen.util.testing import PymatgenTest
from pymatgen.util.testing import MatSciTest

__author__ = "Shyam Dwaraknath"
__copyright__ = "Copyright 2016, The Materials Project"
Expand Down
2 changes: 1 addition & 1 deletion tests/analysis/test_adsorption.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from pymatgen.core.structure import Molecule, Structure
from pymatgen.symmetry.analyzer import SpacegroupAnalyzer
from pymatgen.util.coord import in_coord_list
from pymatgen.util.testing import PymatgenTest
from pymatgen.util.testing import MatSciTest


class TestAdsorbateSiteFinder(MatSciTest):
Expand Down
2 changes: 1 addition & 1 deletion tests/analysis/test_disorder.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from pymatgen.analysis.disorder import get_warren_cowley_parameters
from pymatgen.core import Element, Structure
from pymatgen.util.testing import PymatgenTest
from pymatgen.util.testing import MatSciTest


class TestOrderParameter(MatSciTest):
Expand Down
2 changes: 1 addition & 1 deletion tests/analysis/test_eos.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from pytest import approx

from pymatgen.analysis.eos import EOS, NumericalEOS
from pymatgen.util.testing import PymatgenTest
from pymatgen.util.testing import MatSciTest


class TestEOS(MatSciTest):
Expand Down
2 changes: 1 addition & 1 deletion tests/analysis/test_nmr.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from pytest import approx

from pymatgen.analysis.nmr import ChemicalShielding, ElectricFieldGradient
from pymatgen.util.testing import PymatgenTest
from pymatgen.util.testing import MatSciTest


class TestChemicalShieldingNotation(MatSciTest):
Expand Down
2 changes: 1 addition & 1 deletion tests/analysis/test_piezo.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from numpy.testing import assert_allclose, assert_array_equal

from pymatgen.analysis.piezo import PiezoTensor
from pymatgen.util.testing import PymatgenTest
from pymatgen.util.testing import MatSciTest

__author__ = "Shyam Dwaraknath"
__version__ = "0.1"
Expand Down
2 changes: 1 addition & 1 deletion tests/analysis/test_prototypes.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import annotations

from pymatgen.analysis.prototypes import AflowPrototypeMatcher
from pymatgen.util.testing import PymatgenTest
from pymatgen.util.testing import MatSciTest


class TestAflowPrototypeMatcher(MatSciTest):
Expand Down
2 changes: 1 addition & 1 deletion tests/core/test_composition.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

from pymatgen.core import Composition, DummySpecies, Element, Species
from pymatgen.core.composition import ChemicalPotential
from pymatgen.util.testing import PymatgenTest
from pymatgen.util.testing import MatSciTest


class TestComposition(MatSciTest):
Expand Down
2 changes: 1 addition & 1 deletion tests/core/test_lattice.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from pymatgen.core.lattice import Lattice, get_points_in_spheres
from pymatgen.core.operations import SymmOp
from pymatgen.util.testing import PymatgenTest
from pymatgen.util.testing import MatSciTest


class TestLattice(MatSciTest):
Expand Down
2 changes: 1 addition & 1 deletion tests/core/test_libxcfunc.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import annotations

from pymatgen.core.libxcfunc import LibxcFunc
from pymatgen.util.testing import PymatgenTest
from pymatgen.util.testing import MatSciTest


class TestLibxcFunc(MatSciTest):
Expand Down
2 changes: 1 addition & 1 deletion tests/core/test_molecular_orbitals.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import pytest

from pymatgen.core.molecular_orbitals import MolecularOrbitals
from pymatgen.util.testing import PymatgenTest
from pymatgen.util.testing import MatSciTest

test_case = MolecularOrbitals("NaCl")

Expand Down
2 changes: 1 addition & 1 deletion tests/core/test_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from pymatgen.core.operations import MagSymmOp, SymmOp
from pymatgen.electronic_structure.core import Magmom
from pymatgen.util.testing import PymatgenTest
from pymatgen.util.testing import MatSciTest


class TestSymmOp(MatSciTest):
Expand Down
2 changes: 1 addition & 1 deletion tests/core/test_periodic_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from pymatgen.core.periodic_table import ElementBase, ElementType
from pymatgen.core.units import Ha_to_eV
from pymatgen.io.core import ParseError
from pymatgen.util.testing import PymatgenTest
from pymatgen.util.testing import MatSciTest


class TestElement(MatSciTest):
Expand Down
2 changes: 1 addition & 1 deletion tests/core/test_sites.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from pymatgen.core import Composition, Element, Lattice, PeriodicSite, Site, Species
from pymatgen.electronic_structure.core import Magmom
from pymatgen.util.testing import PymatgenTest
from pymatgen.util.testing import MatSciTest


class TestSite(MatSciTest):
Expand Down
2 changes: 1 addition & 1 deletion tests/core/test_spectrum.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from scipy import stats

from pymatgen.core.spectrum import Spectrum
from pymatgen.util.testing import PymatgenTest
from pymatgen.util.testing import MatSciTest


class TestSpectrum(MatSciTest):
Expand Down
2 changes: 1 addition & 1 deletion tests/core/test_units.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
eV_to_Ha,
unitized,
)
from pymatgen.util.testing import PymatgenTest
from pymatgen.util.testing import MatSciTest


def test_unit_conversions():
Expand Down
2 changes: 1 addition & 1 deletion tests/core/test_xcfunc.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import pytest

from pymatgen.core.xcfunc import XcFunc
from pymatgen.util.testing import PymatgenTest
from pymatgen.util.testing import MatSciTest


class TestLibxcFunc(MatSciTest):
Expand Down
2 changes: 1 addition & 1 deletion tests/ext/test_optimade.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import requests

from pymatgen.ext.optimade import OptimadeRester
from pymatgen.util.testing import PymatgenTest
from pymatgen.util.testing import MatSciTest

try:
# 403 is returned when server detects bot-like behavior
Expand Down
2 changes: 1 addition & 1 deletion tests/io/test_xcrysden.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from pymatgen.core.structure import Structure
from pymatgen.io.xcrysden import XSF
from pymatgen.util.testing import PymatgenTest
from pymatgen.util.testing import MatSciTest


class TestXSF(MatSciTest):
Expand Down
2 changes: 1 addition & 1 deletion tests/optimization/test_neighbors.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from pymatgen.core.lattice import Lattice
from pymatgen.optimization.neighbors import find_points_in_spheres
from pymatgen.util.testing import PymatgenTest
from pymatgen.util.testing import MatSciTest


class TestNeighbors(MatSciTest):
Expand Down
2 changes: 1 addition & 1 deletion tests/symmetry/test_kpath_hin.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from pymatgen.core.lattice import Lattice
from pymatgen.core.structure import Structure
from pymatgen.symmetry.kpath import KPathSeek
from pymatgen.util.testing import PymatgenTest
from pymatgen.util.testing import MatSciTest

pytest.importorskip("seekpath", reason="seekpath not installed")

Expand Down
2 changes: 1 addition & 1 deletion tests/symmetry/test_maggroups.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from pymatgen.core.lattice import Lattice
from pymatgen.symmetry.groups import SpaceGroup
from pymatgen.symmetry.maggroups import MagneticSpaceGroup
from pymatgen.util.testing import PymatgenTest
from pymatgen.util.testing import MatSciTest

__author__ = "Matthew Horton"
__copyright__ = "Copyright 2017, The Materials Project"
Expand Down
2 changes: 1 addition & 1 deletion tests/transformations/test_site_transformations.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
ReplaceSiteSpeciesTransformation,
TranslateSitesTransformation,
)
from pymatgen.util.testing import PymatgenTest
from pymatgen.util.testing import MatSciTest

enum_cmd = which("enum.x") or which("multienum.x")
makestr_cmd = which("makestr.x") or which("makeStr.x") or which("makeStr.py")
Expand Down
2 changes: 1 addition & 1 deletion tests/util/test_plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import matplotlib.pyplot as plt

from pymatgen.util.plotting import periodic_table_heatmap, van_arkel_triangle
from pymatgen.util.testing import PymatgenTest
from pymatgen.util.testing import MatSciTest

try:
import pymatviz
Expand Down

0 comments on commit dfb616c

Please sign in to comment.