Skip to content

Commit ba308df

Browse files
committed
TST: stricter warning checks
Signed-off-by: Henry Schreiner <[email protected]>
1 parent d808e2e commit ba308df

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,7 @@ addopts = ['-ra', '--strict-markers', '--strict-config']
8383
log_cli_level = 'info'
8484
norecursedirs = 'tests/packages/*'
8585
testpaths = ['tests']
86+
xfail_strict = true
87+
filterwarnings = [
88+
'error',
89+
]

tests/conftest.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import subprocess
1010
import sys
1111
import tempfile
12+
import warnings
1213

1314
from venv import EnvBuilder
1415

@@ -71,7 +72,12 @@ def tmp_dir_session(tmpdir_factory):
7172
class VEnv(EnvBuilder):
7273
def __init__(self, env_dir):
7374
super().__init__(with_pip=True)
74-
self.create(env_dir)
75+
# This warning is mistakenly generated by CPython 3.11.0
76+
# https://github.com/python/cpython/pull/98743
77+
with warnings.catch_warnings():
78+
if sys.version_info[:3] == (3, 11, 0):
79+
warnings.filterwarnings('ignore', 'check_home argument is deprecated and ignored.', DeprecationWarning)
80+
self.create(env_dir)
7581

7682
def ensure_directories(self, env_dir):
7783
context = super().ensure_directories(env_dir)

0 commit comments

Comments
 (0)