From a1bd0be3007411d6b18544835a0838423ed2669b 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 | 3 +++ tests/densities/test_inhibitory_neuron_density_optimization.py | 1 + tox.ini | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/app/test_cell_densities.py b/tests/app/test_cell_densities.py index a922812..babab8c 100644 --- a/tests/app/test_cell_densities.py +++ b/tests/app/test_cell_densities.py @@ -6,6 +6,7 @@ import numpy.testing as npt import pandas as pd import pandas.testing as pdt +import pytest import yaml # type: ignore from click.testing import CliRunner from voxcell import VoxelData # type: ignore @@ -230,6 +231,7 @@ 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 +340,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