From 1da950caf023bd4c54649cae5ef4e8068d97d385 Mon Sep 17 00:00:00 2001 From: Mike Gevaert Date: Wed, 4 Oct 2023 15:28:16 +0200 Subject: [PATCH] filter some warnings --- tests/app/test_cell_densities.py | 4 ++++ .../densities/test_inhibitory_neuron_density_optimization.py | 1 + tox.ini | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/app/test_cell_densities.py b/tests/app/test_cell_densities.py index a922812..276bb74 100644 --- a/tests/app/test_cell_densities.py +++ b/tests/app/test_cell_densities.py @@ -7,6 +7,7 @@ import pandas as pd import pandas.testing as pdt import yaml # type: ignore +import pytest from click.testing import CliRunner from voxcell import VoxelData # type: ignore @@ -230,6 +231,8 @@ def _get_compile_measurements_result(runner): return runner.invoke(tested.app, args) + +@pytest.mark.filterwarnings("ignore::atlas_densities.exceptions.AtlasDensitiesWarning") def test_compile_measurements(): runner = CliRunner() with runner.isolated_filesystem(): @@ -338,6 +341,7 @@ def _get_fitting_result(runner): return runner.invoke(tested.app, args) +@pytest.mark.filterwarnings("ignore::atlas_densities.exceptions.AtlasDensitiesWarning") def test_fit_average_densities(): runner = CliRunner() with runner.isolated_filesystem(): diff --git a/tests/densities/test_inhibitory_neuron_density_optimization.py b/tests/densities/test_inhibitory_neuron_density_optimization.py index 11985fc..65999f3 100644 --- a/tests/densities/test_inhibitory_neuron_density_optimization.py +++ b/tests/densities/test_inhibitory_neuron_density_optimization.py @@ -310,6 +310,7 @@ def get_initialization_data(): } +@pytest.mark.filterwarnings("ignore::atlas_densities.exceptions.AtlasDensitiesWarning") def test_create_inhibitory_neuron_densities(): data = get_initialization_data() densities = tested.create_inhibitory_neuron_densities( diff --git a/tox.ini b/tox.ini index ede8681..c795446 100644 --- a/tox.ini +++ b/tox.ini @@ -5,7 +5,7 @@ black_version = 22.0 [testenv] extras = tests passenv = PYTHONPATH -commands = pytest tests {posargs} +commands = pytest -W "ignore::DeprecationWarning:nptyping.typing_" tests {posargs} [testenv:lint] passenv = PYTHONPATH