Skip to content

Commit

Permalink
Fix tests for pytest-8 (scverse#2837)
Browse files Browse the repository at this point in the history
  • Loading branch information
ivirshup authored Jan 29, 2024
1 parent 96e1954 commit 8986921
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ scanpy = "scanpy.cli:console_main"

[project.optional-dependencies]
test-min = [
"pytest>=7.4.2",
"pytest>=7.4.2,<8",
"pytest-nunit",
"pytest-mock",
"profimp",
Expand Down
5 changes: 3 additions & 2 deletions scanpy/tests/test_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from __future__ import annotations

import subprocess
import warnings
from pathlib import Path

import numpy as np
Expand Down Expand Up @@ -86,9 +87,9 @@ def test_toggleswitch():


def test_pbmc68k_reduced():
with pytest.warns(None) as records:
with warnings.catch_warnings():
warnings.simplefilter("error")
sc.datasets.pbmc68k_reduced()
assert len(records) == 0 # Test that loading a dataset does not warn


@pytest.mark.internet
Expand Down

0 comments on commit 8986921

Please sign in to comment.