Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(fixtures): support pytest>=8, drop pytest-cases dependency #137

Merged
merged 3 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
),
)
Loading