Skip to content

Commit 5672ce1

Browse files
author
Tales da Aparecida
committed
pytest: ignore pkg_resources warnings
Warnings from pkg_resource are causing unit tests to fail, due to they handling stderr directly. As a patchwork, ignore warnings until we rewrite the tests. Signed-off-by: Tales da Aparecida <tales.aparecida@redhat.com>
1 parent 95f97da commit 5672ce1

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929
- name: Set up Python ${{ matrix.python-version }}
3030
uses: actions/setup-python@v5
3131
with:
32+
cache: 'pip'
3233
python-version: ${{ matrix.python-version }}
3334
- name: Check setup.py and requirements.txt are consistent
3435
run: |
@@ -67,6 +68,7 @@ jobs:
6768
pytest --tb=native --durations=0 --durations-min=1
6869
env:
6970
KCIDB_HOOKS: "pre-commit"
71+
PYTHONWARNINGS: "ignore:pkg_resources is deprecated:UserWarning"
7072

7173
check_auxiliary_files:
7274

pytest.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
[pytest]
22
filterwarnings =
3-
ignore:Deprecated call to `pkg_resources.declare_namespace\('google'\)`:DeprecationWarning
3+
ignore:Deprecated call to `pkg_resources.declare_namespace:DeprecationWarning
4+
ignore:pkg_resources is deprecated:UserWarning

0 commit comments

Comments
 (0)