Skip to content

Commit

Permalink
Restricting EncodingWarning ignores in pytest.ini
Browse files Browse the repository at this point in the history
  • Loading branch information
Avasam committed Feb 24, 2024
1 parent b5aef75 commit 74c586f
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,24 @@ filterwarnings=
# Ensure ResourceWarnings are emitted
default::ResourceWarning

# Workarounds for pypa/setuptools#3810
# Can't use EncodingWarning as it doesn't exist on Python 3.9
default:'encoding' argument not specified
# subprocess.check_output still warns with EncodingWarning even with encoding set
ignore:'encoding' argument not specified::setuptools.tests.environment

# realpython/pytest-mypy#152
ignore:'encoding' argument not specified::pytest_mypy

# python/cpython#100750
ignore:'encoding' argument not specified::platform

# pypa/build#615
ignore:'encoding' argument not specified::build.env
# TODO: These 3 ignores don't work, why?
# pypa/pip#12070
ignore:'encoding' argument not specified::pip

# pytest-dev/pytest # TODO: Raise issue upstream
ignore:'encoding' argument not specified::_pytest

# dateutil/dateutil#1284
ignore:datetime.datetime.utcfromtimestamp:DeprecationWarning:dateutil.tz.tz
# pypa/distutils # TODO: Raise issue upstream
ignore:'encoding' argument not specified::setuptools._distutils

## end upstream

Expand Down Expand Up @@ -68,11 +75,6 @@ filterwarnings=
# https://github.com/pypa/setuptools/issues/3655
ignore:The --rsyncdir command line argument and rsyncdirs config variable are deprecated.:DeprecationWarning

# Workarounds for pypa/setuptools#3810
# Can't use EncodingWarning as it doesn't exist on Python 3.9
default:'encoding' argument not specified
default:UTF-8 Mode affects locale.getpreferredencoding().

# Avoid errors when testing pkg_resources.declare_namespace
ignore:.*pkg_resources\.declare_namespace.*:DeprecationWarning

Expand Down

0 comments on commit 74c586f

Please sign in to comment.