From 49bbce4555d460b6d13bc4d2f8da63e16a6186b0 Mon Sep 17 00:00:00 2001 From: "Haoyu (Daniel)" Date: Tue, 17 Dec 2024 13:04:10 +0800 Subject: [PATCH] remove Python < 3.10 check --- tests/util/test_typing.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/tests/util/test_typing.py b/tests/util/test_typing.py index 2fe5592605c..c0dd731fb55 100644 --- a/tests/util/test_typing.py +++ b/tests/util/test_typing.py @@ -2,13 +2,10 @@ from __future__ import annotations -import sys from pathlib import Path from types import GenericAlias from typing import TYPE_CHECKING, get_args -import pytest - from pymatgen.core import Composition, DummySpecies, Element, Species from pymatgen.entries import Entry from pymatgen.util.typing import CompositionLike, EntryLike, PathLike, PbcLike, SpeciesLike @@ -20,8 +17,6 @@ __date__ = "2022-10-20" __email__ = "janosh@lbl.gov" -skip_below_py310 = pytest.mark.skipif(sys.version_info < (3, 10), reason="requires python 3.10 or higher") - def _type_str(some_type: Any) -> str: return str(some_type).replace("typing.", "").replace("pymatgen.core.periodic_table.", "") @@ -48,7 +43,6 @@ def test_entry_like(): assert Entry.__name__ in str(EntryLike) -@skip_below_py310 def test_species_like(): assert isinstance("H", SpeciesLike) assert isinstance(Element("H"), SpeciesLike) @@ -56,7 +50,6 @@ def test_species_like(): assert isinstance(DummySpecies("X"), SpeciesLike) -@skip_below_py310 def test_composition_like(): assert isinstance("H", CompositionLike) assert isinstance(Element("H"), CompositionLike) @@ -71,7 +64,6 @@ def test_pbc_like(): assert get_args(PbcLike) == (bool, bool, bool) -@skip_below_py310 def test_pathlike(): assert isinstance("path/to/file", PathLike) assert isinstance(Path("path/to/file"), PathLike)