mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
Code Clean: Remove python3.8 specific code because PyTorch now need Python3.9 and later (#150834)
As the title stated. Pull Request resolved: https://github.com/pytorch/pytorch/pull/150834 Approved by: https://github.com/Skylion007, https://github.com/albanD
This commit is contained in:
parent
901b02cf16
commit
17f9276e29
|
|
@ -3,7 +3,6 @@
|
|||
import functools
|
||||
import operator
|
||||
import pickle
|
||||
import sys
|
||||
import types
|
||||
from itertools import permutations
|
||||
from typing import Any
|
||||
|
|
@ -325,11 +324,6 @@ class TestMisc(TestCase):
|
|||
# test for https://github.com/numpy/numpy/pull/16574#issuecomment-642660971
|
||||
assert np.dtype(dtype=np.float64) == np.dtype(np.float64)
|
||||
|
||||
@skipif(sys.version_info >= (3, 9), reason="Requires python 3.9")
|
||||
def test_class_getitem_38(self) -> None:
|
||||
with pytest.raises(TypeError):
|
||||
np.dtype[Any]
|
||||
|
||||
|
||||
class TestFromDTypeAttribute(TestCase):
|
||||
def test_simple(self):
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ Test the scalar constructors, which also do type-coercion
|
|||
"""
|
||||
import fractions
|
||||
import functools
|
||||
import sys
|
||||
import types
|
||||
from typing import Any
|
||||
from unittest import skipIf as skipif, SkipTest
|
||||
|
|
@ -222,15 +221,6 @@ class TestClassGetItem(TestCase):
|
|||
assert np.number[Any]
|
||||
|
||||
|
||||
@instantiate_parametrized_tests
|
||||
class TestClassGetitemMisc(TestCase):
|
||||
@skipif(sys.version_info >= (3, 9), reason="Requires python 3.8")
|
||||
@parametrize("cls", [np.number, np.complexfloating, np.int64])
|
||||
def test_class_getitem_38(self, cls: type[np.number]) -> None:
|
||||
with pytest.raises(TypeError):
|
||||
cls[Any]
|
||||
|
||||
|
||||
@skip(reason="scalartype(...).bit_count() not implemented")
|
||||
@instantiate_parametrized_tests
|
||||
class TestBitCount(TestCase):
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user