Skip to content

Commit

Permalink
refactor(fixtures): support pytest>=8, drop pytest-cases dependency (M…
Browse files Browse the repository at this point in the history
  • Loading branch information
wpbonelli authored Jan 31, 2024
1 parent 9356e06 commit 613ad01
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -142,3 +142,4 @@ app
# in case developer installs modflow executables in the project root
bin

**.DS_Store
2 changes: 1 addition & 1 deletion autotest/test_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def test_keep_session_scoped_tmpdir(tmp_path, arg, request):
]
assert pytest.main(args) == ExitCode.OK
assert Path(
tmp_path / f"{request.session.name}0" / test_keep_fname
tmp_path / f"{request.config.rootpath.name}0" / test_keep_fname
).is_file()


Expand Down
2 changes: 1 addition & 1 deletion modflow_devtools/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def module_tmpdir(tmpdir_factory, request) -> Path:

@pytest.fixture(scope="session")
def session_tmpdir(tmpdir_factory, request) -> Path:
temp = Path(tmpdir_factory.mktemp(request.session.name))
temp = Path(tmpdir_factory.mktemp(request.config.rootpath.name))
yield temp

keep = request.config.option.KEEP
Expand Down
1 change: 0 additions & 1 deletion modflow_devtools/ostags.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
systems differently. This module contains conversion utilities.
"""


import sys
from enum import Enum
from platform import system
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ test = [
"ninja",
"numpy",
"pytest",
"pytest-cases",
"pytest-cov",
"pytest-dotenv",
"pytest-xdist",
Expand Down
6 changes: 3 additions & 3 deletions scripts/update_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def update_version(
else:
update_version(
timestamp=datetime.now(),
version=Version(args.version)
if args.version
else _current_version,
version=(
Version(args.version) if args.version else _current_version
),
)

0 comments on commit 613ad01

Please sign in to comment.