diff --git a/tests/test_main.py b/tests/test_main.py index b8edcd00654..b5afee4e2b3 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -2,7 +2,6 @@ import platform import re import sys -import warnings from collections import defaultdict from copy import deepcopy from dataclasses import dataclass @@ -2977,28 +2976,6 @@ class Bar(BaseModel): assert Foo.__pydantic_core_schema__ -def test_help(create_module): - # since pydoc/help access all attributes to generate their documentation, - # this triggers the deprecation warnings. - with warnings.catch_warnings(): - module = create_module( - # language=Python - """ -import pydoc - -from pydantic import BaseModel - -class Model(BaseModel): - x: int - - -help_result_string = pydoc.render_doc(Model) -""" - ) - warnings.simplefilter('error') - assert 'class Model' in module.help_result_string - - def test_cannot_use_leading_underscore_field_names(): with pytest.raises( NameError, match="Fields must not use names with leading underscores; e.g., use 'x' instead of '_x'" diff --git a/tests/test_root_model.py b/tests/test_root_model.py index e56744a5a8e..c9577fbd546 100644 --- a/tests/test_root_model.py +++ b/tests/test_root_model.py @@ -1,5 +1,4 @@ import pickle -import warnings from datetime import date, datetime from typing import Any, Dict, List, Optional, Union @@ -591,25 +590,6 @@ class Model(RootModel): Model.model_json_schema() -def test_help(create_module): - # since pydoc/help access all attributes to generate their documentation, - # this triggers the deprecation warnings. - with warnings.catch_warnings(): - module = create_module( - # language=Python - """ -import pydoc - -from pydantic import RootModel - - -help_result_string = pydoc.render_doc(RootModel) -""" - ) - warnings.simplefilter('error') - assert 'class RootModel' in module.help_result_string - - def test_copy_preserves_equality(): model = RootModel()