From dfb616c0ac574fc100a28b9a7ffb213dece9a6d3 Mon Sep 17 00:00:00 2001 From: "Haoyu (Daniel)" Date: Wed, 4 Dec 2024 23:27:58 +0800 Subject: [PATCH] global replace PymatgenTest import --- .../analysis/chemenv/connectivity/test_environment_nodes.py | 2 +- .../coordination_environments/test_chemenv_strategies.py | 2 +- .../test_coordination_geometries.py | 2 +- .../chemenv/utils/test_coordination_geometry_utils.py | 2 +- tests/analysis/chemenv/utils/test_graph_utils.py | 2 +- tests/analysis/chemenv/utils/test_math_utils.py | 2 +- tests/analysis/diffraction/test_neutron.py | 2 +- tests/analysis/diffraction/test_tem.py | 2 +- tests/analysis/diffraction/test_xrd.py | 2 +- tests/analysis/elasticity/test_strain.py | 2 +- tests/analysis/elasticity/test_stress.py | 2 +- tests/analysis/interfaces/test_coherent_interface.py | 2 +- tests/analysis/interfaces/test_substrate_analyzer.py | 6 +++--- tests/analysis/interfaces/test_zsl.py | 2 +- tests/analysis/test_adsorption.py | 2 +- tests/analysis/test_disorder.py | 2 +- tests/analysis/test_eos.py | 2 +- tests/analysis/test_nmr.py | 2 +- tests/analysis/test_piezo.py | 2 +- tests/analysis/test_prototypes.py | 2 +- tests/core/test_composition.py | 2 +- tests/core/test_lattice.py | 2 +- tests/core/test_libxcfunc.py | 2 +- tests/core/test_molecular_orbitals.py | 2 +- tests/core/test_operations.py | 2 +- tests/core/test_periodic_table.py | 2 +- tests/core/test_sites.py | 2 +- tests/core/test_spectrum.py | 2 +- tests/core/test_units.py | 2 +- tests/core/test_xcfunc.py | 2 +- tests/ext/test_optimade.py | 2 +- tests/io/test_xcrysden.py | 2 +- tests/optimization/test_neighbors.py | 2 +- tests/symmetry/test_kpath_hin.py | 2 +- tests/symmetry/test_maggroups.py | 2 +- tests/transformations/test_site_transformations.py | 2 +- tests/util/test_plotting.py | 2 +- 37 files changed, 39 insertions(+), 39 deletions(-) diff --git a/tests/analysis/chemenv/connectivity/test_environment_nodes.py b/tests/analysis/chemenv/connectivity/test_environment_nodes.py index dc7956ab764..e9a8e07bea0 100644 --- a/tests/analysis/chemenv/connectivity/test_environment_nodes.py +++ b/tests/analysis/chemenv/connectivity/test_environment_nodes.py @@ -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 diff --git a/tests/analysis/chemenv/coordination_environments/test_chemenv_strategies.py b/tests/analysis/chemenv/coordination_environments/test_chemenv_strategies.py index d7cd8a2a474..2c7903385fb 100644 --- a/tests/analysis/chemenv/coordination_environments/test_chemenv_strategies.py +++ b/tests/analysis/chemenv/coordination_environments/test_chemenv_strategies.py @@ -10,7 +10,7 @@ DistanceCutoffFloat, SimplestChemenvStrategy, ) -from pymatgen.util.testing import PymatgenTest +from pymatgen.util.testing import MatSciTest __author__ = "waroquiers" diff --git a/tests/analysis/chemenv/coordination_environments/test_coordination_geometries.py b/tests/analysis/chemenv/coordination_environments/test_coordination_geometries.py index e07ead94557..b64d1406a16 100644 --- a/tests/analysis/chemenv/coordination_environments/test_coordination_geometries.py +++ b/tests/analysis/chemenv/coordination_environments/test_coordination_geometries.py @@ -11,7 +11,7 @@ ExplicitPermutationsAlgorithm, SeparationPlane, ) -from pymatgen.util.testing import PymatgenTest +from pymatgen.util.testing import MatSciTest __author__ = "waroquiers" diff --git a/tests/analysis/chemenv/utils/test_coordination_geometry_utils.py b/tests/analysis/chemenv/utils/test_coordination_geometry_utils.py index 9b459d736e2..03db878145c 100644 --- a/tests/analysis/chemenv/utils/test_coordination_geometry_utils.py +++ b/tests/analysis/chemenv/utils/test_coordination_geometry_utils.py @@ -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" diff --git a/tests/analysis/chemenv/utils/test_graph_utils.py b/tests/analysis/chemenv/utils/test_graph_utils.py index 25a791d1e1b..e086b862d8c 100644 --- a/tests/analysis/chemenv/utils/test_graph_utils.py +++ b/tests/analysis/chemenv/utils/test_graph_utils.py @@ -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" diff --git a/tests/analysis/chemenv/utils/test_math_utils.py b/tests/analysis/chemenv/utils/test_math_utils.py index 184f3364a26..889a836e8e0 100644 --- a/tests/analysis/chemenv/utils/test_math_utils.py +++ b/tests/analysis/chemenv/utils/test_math_utils.py @@ -16,7 +16,7 @@ smootherstep, smoothstep, ) -from pymatgen.util.testing import PymatgenTest +from pymatgen.util.testing import MatSciTest __author__ = "waroquiers" diff --git a/tests/analysis/diffraction/test_neutron.py b/tests/analysis/diffraction/test_neutron.py index eb031175743..16a137c8301 100644 --- a/tests/analysis/diffraction/test_neutron.py +++ b/tests/analysis/diffraction/test_neutron.py @@ -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. diff --git a/tests/analysis/diffraction/test_tem.py b/tests/analysis/diffraction/test_tem.py index 2e491e6b486..bf28f0b4bb1 100644 --- a/tests/analysis/diffraction/test_tem.py +++ b/tests/analysis/diffraction/test_tem.py @@ -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" diff --git a/tests/analysis/diffraction/test_xrd.py b/tests/analysis/diffraction/test_xrd.py index ce2e13851f0..b3b5f180f7d 100644 --- a/tests/analysis/diffraction/test_xrd.py +++ b/tests/analysis/diffraction/test_xrd.py @@ -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" diff --git a/tests/analysis/elasticity/test_strain.py b/tests/analysis/elasticity/test_strain.py index 56bab6cf982..0ff2d2ed590 100644 --- a/tests/analysis/elasticity/test_strain.py +++ b/tests/analysis/elasticity/test_strain.py @@ -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): diff --git a/tests/analysis/elasticity/test_stress.py b/tests/analysis/elasticity/test_stress.py index f37192cf4c7..100604b9700 100644 --- a/tests/analysis/elasticity/test_stress.py +++ b/tests/analysis/elasticity/test_stress.py @@ -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): diff --git a/tests/analysis/interfaces/test_coherent_interface.py b/tests/analysis/interfaces/test_coherent_interface.py index 5ad0c9e78ec..7115f85f7f3 100644 --- a/tests/analysis/interfaces/test_coherent_interface.py +++ b/tests/analysis/interfaces/test_coherent_interface.py @@ -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): diff --git a/tests/analysis/interfaces/test_substrate_analyzer.py b/tests/analysis/interfaces/test_substrate_analyzer.py index 06f6ddba240..29002cbfff8 100644 --- a/tests/analysis/interfaces/test_substrate_analyzer.py +++ b/tests/analysis/interfaces/test_substrate_analyzer.py @@ -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() diff --git a/tests/analysis/interfaces/test_zsl.py b/tests/analysis/interfaces/test_zsl.py index c18a6042fc7..f38892b8753 100644 --- a/tests/analysis/interfaces/test_zsl.py +++ b/tests/analysis/interfaces/test_zsl.py @@ -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" diff --git a/tests/analysis/test_adsorption.py b/tests/analysis/test_adsorption.py index 9bc84be4b83..e3b9d0070fe 100644 --- a/tests/analysis/test_adsorption.py +++ b/tests/analysis/test_adsorption.py @@ -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): diff --git a/tests/analysis/test_disorder.py b/tests/analysis/test_disorder.py index ab4a7a7b315..c6d449eccf5 100644 --- a/tests/analysis/test_disorder.py +++ b/tests/analysis/test_disorder.py @@ -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): diff --git a/tests/analysis/test_eos.py b/tests/analysis/test_eos.py index a388440cc2b..874c476ce3b 100644 --- a/tests/analysis/test_eos.py +++ b/tests/analysis/test_eos.py @@ -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): diff --git a/tests/analysis/test_nmr.py b/tests/analysis/test_nmr.py index b3f97fe2c3e..b0ca34759b3 100644 --- a/tests/analysis/test_nmr.py +++ b/tests/analysis/test_nmr.py @@ -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): diff --git a/tests/analysis/test_piezo.py b/tests/analysis/test_piezo.py index 42d659976c1..06f89320b12 100644 --- a/tests/analysis/test_piezo.py +++ b/tests/analysis/test_piezo.py @@ -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" diff --git a/tests/analysis/test_prototypes.py b/tests/analysis/test_prototypes.py index acf8b8472fd..887b5d598d4 100644 --- a/tests/analysis/test_prototypes.py +++ b/tests/analysis/test_prototypes.py @@ -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): diff --git a/tests/core/test_composition.py b/tests/core/test_composition.py index b0a5e3bfe75..bb9d2bd4364 100644 --- a/tests/core/test_composition.py +++ b/tests/core/test_composition.py @@ -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): diff --git a/tests/core/test_lattice.py b/tests/core/test_lattice.py index 622da5c9b24..32a42a62e16 100644 --- a/tests/core/test_lattice.py +++ b/tests/core/test_lattice.py @@ -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): diff --git a/tests/core/test_libxcfunc.py b/tests/core/test_libxcfunc.py index 7fb82780466..1436f08e42e 100644 --- a/tests/core/test_libxcfunc.py +++ b/tests/core/test_libxcfunc.py @@ -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): diff --git a/tests/core/test_molecular_orbitals.py b/tests/core/test_molecular_orbitals.py index 4943a17ec7a..c2275268a33 100644 --- a/tests/core/test_molecular_orbitals.py +++ b/tests/core/test_molecular_orbitals.py @@ -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") diff --git a/tests/core/test_operations.py b/tests/core/test_operations.py index 3376993f310..286b9ce1ae9 100644 --- a/tests/core/test_operations.py +++ b/tests/core/test_operations.py @@ -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): diff --git a/tests/core/test_periodic_table.py b/tests/core/test_periodic_table.py index 1bb2e76473b..2357ee1a924 100644 --- a/tests/core/test_periodic_table.py +++ b/tests/core/test_periodic_table.py @@ -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): diff --git a/tests/core/test_sites.py b/tests/core/test_sites.py index b1d3cfa0675..83120018eb0 100644 --- a/tests/core/test_sites.py +++ b/tests/core/test_sites.py @@ -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): diff --git a/tests/core/test_spectrum.py b/tests/core/test_spectrum.py index 5c2cd5780e1..32d7760a992 100644 --- a/tests/core/test_spectrum.py +++ b/tests/core/test_spectrum.py @@ -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): diff --git a/tests/core/test_units.py b/tests/core/test_units.py index 3e420bdad8f..c7d89c60436 100644 --- a/tests/core/test_units.py +++ b/tests/core/test_units.py @@ -26,7 +26,7 @@ eV_to_Ha, unitized, ) -from pymatgen.util.testing import PymatgenTest +from pymatgen.util.testing import MatSciTest def test_unit_conversions(): diff --git a/tests/core/test_xcfunc.py b/tests/core/test_xcfunc.py index fb95376d4b9..bafedc17902 100644 --- a/tests/core/test_xcfunc.py +++ b/tests/core/test_xcfunc.py @@ -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): diff --git a/tests/ext/test_optimade.py b/tests/ext/test_optimade.py index 01882b19cfc..1f95a28bb86 100644 --- a/tests/ext/test_optimade.py +++ b/tests/ext/test_optimade.py @@ -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 diff --git a/tests/io/test_xcrysden.py b/tests/io/test_xcrysden.py index bd217b15fbd..59f57a56a1b 100644 --- a/tests/io/test_xcrysden.py +++ b/tests/io/test_xcrysden.py @@ -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): diff --git a/tests/optimization/test_neighbors.py b/tests/optimization/test_neighbors.py index f08f4929428..2e550d7274d 100644 --- a/tests/optimization/test_neighbors.py +++ b/tests/optimization/test_neighbors.py @@ -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): diff --git a/tests/symmetry/test_kpath_hin.py b/tests/symmetry/test_kpath_hin.py index 08ae60e71bb..de384d7fe3c 100644 --- a/tests/symmetry/test_kpath_hin.py +++ b/tests/symmetry/test_kpath_hin.py @@ -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") diff --git a/tests/symmetry/test_maggroups.py b/tests/symmetry/test_maggroups.py index 2b474285836..57a2da36dfb 100644 --- a/tests/symmetry/test_maggroups.py +++ b/tests/symmetry/test_maggroups.py @@ -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" diff --git a/tests/transformations/test_site_transformations.py b/tests/transformations/test_site_transformations.py index e7e5be40efe..bddf1ca817f 100644 --- a/tests/transformations/test_site_transformations.py +++ b/tests/transformations/test_site_transformations.py @@ -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") diff --git a/tests/util/test_plotting.py b/tests/util/test_plotting.py index b8c13bd1480..e8c55875fbd 100644 --- a/tests/util/test_plotting.py +++ b/tests/util/test_plotting.py @@ -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