Skip to content

Commit 7d360bf

Browse files
committed
Fix tests
1 parent 3cb81d1 commit 7d360bf

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

setuptools_git_versioning.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -227,9 +227,7 @@ def infer_version(dist: Distribution, root: str | os.PathLike | None = None) ->
227227
"Both 'setup.py' and 'pyproject.toml' have 'setuptools_git_versioning' config section. "
228228
"Please remove one of them"
229229
)
230-
raise DistutilsSetupError(
231-
msg,
232-
)
230+
raise DistutilsSetupError(msg)
233231

234232
if config is None:
235233
# Nothing to do here
@@ -496,9 +494,7 @@ def version_from_git( # noqa: PLR0915, PLR0912, PLR0913, C901
496494
if version_callback is not None:
497495
if version_file is not None:
498496
msg = "Either 'version_file' or 'version_callback' can be passed, but not both at the same time"
499-
raise ValueError(
500-
msg,
501-
)
497+
raise ValueError(msg)
502498
return _get_version_from_callback(version_callback, package_name, root=root)
503499

504500
head_sha = get_sha(root=root)

tests/lib/util.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,7 @@ def get_version_module(cwd: str | os.PathLike, args: list[str] | None = None, **
322322
def get_version_script(cwd: str | os.PathLike, args: list[str] | None = None, **kwargs) -> str:
323323
return execute(
324324
cwd,
325+
sys.executable,
325326
"-m",
326327
"coverage",
327328
"run",

0 commit comments

Comments
 (0)