Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions testing/test_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,19 @@ def _modules():


@pytest.mark.slow
@pytest.mark.parametrize("type_checking", (0, 1))
@pytest.mark.parametrize("module", _modules())
def test_no_warnings(module):
# fmt: off
subprocess.check_call((
sys.executable,
"-W", "error",
# https://github.com/pytest-dev/pytest/issues/5901
"-W", "ignore:The usage of `cmp` is deprecated and will be removed on or after 2021-06-01. Please use `eq` and `order` instead.:DeprecationWarning", # noqa: E501
"-c", "import {}".format(module),
))
# fmt: on
def test_no_warnings(module, type_checking):
subprocess.check_call(
(
sys.executable,
"-W",
"error",
# https://github.com/pytest-dev/pytest/issues/5901
"-W",
"ignore:The usage of `cmp` is deprecated and will be removed on or after 2021-06-01. Please use `eq` and `order` instead.:DeprecationWarning", # noqa: E501
"-c",
("import typing; typing.TYPE_CHECKING = True;" if type_checking else "")
+ "import {}".format(module),
)
)