Skip to content

Commit

Permalink
Fix CI for 0.1.5
Browse files Browse the repository at this point in the history
Signed-off-by: Bernát Gábor <[email protected]>
  • Loading branch information
gaborbernat committed Feb 20, 2024
1 parent 3c50331 commit 211178a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ dynamic = [
]
dependencies = [
"tox<5,>=4.13",
"uv<1,>=0.1.4",
"uv<1,>=0.1.5",
]
optional-dependencies.test = [
"covdefaults>=2.3",
Expand Down
6 changes: 5 additions & 1 deletion tests/test_tox_uv_installer.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from __future__ import annotations

import sys
from typing import TYPE_CHECKING

if TYPE_CHECKING:
Expand All @@ -22,7 +23,10 @@ def test_uv_install_in_ci_seed(tox_project: ToxProjectCreator, monkeypatch: pyte
result = project.run()
result.assert_success()
report = {i.split("=")[0] for i in result.out.splitlines()[-3][4:].split(",")}
assert report == {"pip", "setuptools", "wheel"}
if sys.version_info >= (3, 12): # pragma: >=3.12 cover
assert report == {"pip"}
else: # pragma: <3.12 cover
assert report == {"pip", "setuptools", "wheel"}


def test_uv_install_with_pre(tox_project: ToxProjectCreator) -> None:
Expand Down
13 changes: 10 additions & 3 deletions tests/test_tox_uv_package.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from __future__ import annotations

import sys
from typing import TYPE_CHECKING

import pytest
Expand Down Expand Up @@ -30,9 +31,15 @@ def test_uv_package_editable(tox_project: ToxProjectCreator, package: str, demo_


def test_uv_package_editable_legacy(tox_project: ToxProjectCreator, demo_pkg_setuptools: Path) -> None:
project = tox_project(
{"tox.ini": "[testenv]\npackage=editable-legacy\n[testenv:.pkg]\nuv_seed=true"}, base=demo_pkg_setuptools
)
ini = f"""
[testenv]
package=editable-legacy
[testenv:.pkg]
uv_seed = true
{"deps = wheel" if sys.version_info >= (3, 12) else ""}
"""
project = tox_project({"tox.ini": ini}, base=demo_pkg_setuptools)
result = project.run()
result.assert_success()

Expand Down

0 comments on commit 211178a

Please sign in to comment.