diff --git a/test/test_transforms_v2.py b/test/test_transforms_v2.py index 0f985ab9604..00ed6a8aef1 100644 --- a/test/test_transforms_v2.py +++ b/test/test_transforms_v2.py @@ -57,10 +57,9 @@ # turns all warnings into errors for this module pytestmark = [pytest.mark.filterwarnings("error")] -if sys.version_info[:2] >= (3, 12): - # torchscript relies on some AST stuff that got deprecated in 3.12, - # so we have to explicitly ignore those otherwise we'd error on warnings due to the pytestmark filter above. - pytestmark.append(pytest.mark.filterwarnings("ignore::DeprecationWarning")) +# Since torchscript is deprecated, we are explicitly ignoring those warnings. +# Otherwise we'd error on warnings due to the pytestmark filter above. +pytestmark.append(pytest.mark.filterwarnings("ignore::DeprecationWarning")) @pytest.fixture(autouse=True)