From bcd1d9397bc69d28b1c6173e2f903d68e8362997 Mon Sep 17 00:00:00 2001 From: "John T. Wodder II" Date: Wed, 8 Nov 2023 10:54:02 -0500 Subject: [PATCH] Replace `_pytest` imports with modern `pytest` imports --- dandi/conftest.py | 4 +--- dandi/tests/fixtures.py | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/dandi/conftest.py b/dandi/conftest.py index 347f31f1b..b5d59ffd5 100644 --- a/dandi/conftest.py +++ b/dandi/conftest.py @@ -1,8 +1,6 @@ from typing import List -from _pytest.config import Config -from _pytest.config.argparsing import Parser -from _pytest.nodes import Item +from pytest import Config, Item, Parser from .tests.fixtures import * # noqa: F401, F403 # lgtm [py/polluting-import] diff --git a/dandi/tests/fixtures.py b/dandi/tests/fixtures.py index 788a1a438..007ab32e3 100644 --- a/dandi/tests/fixtures.py +++ b/dandi/tests/fixtures.py @@ -12,7 +12,6 @@ from typing import TYPE_CHECKING, Any, Callable, Dict, Iterator, List, Optional, Union from uuid import uuid4 -from _pytest.fixtures import FixtureRequest from click.testing import CliRunner from dandischema.consts import DANDI_SCHEMA_VERSION from dateutil.tz import tzlocal, tzutc @@ -565,7 +564,7 @@ def sample_dandiset_factory( @pytest.fixture() def new_dandiset( - request: FixtureRequest, sample_dandiset_factory: SampleDandisetFactory + request: pytest.FixtureRequest, sample_dandiset_factory: SampleDandisetFactory ) -> SampleDandiset: return sample_dandiset_factory.mkdandiset( f"Sample Dandiset for {request.node.name}"