Skip to content
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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ readme = "README.md"
license = {file = "LICENSE"}
dependencies = [
"typer>=0.16.0,<0.27",
"rich>=14.1.0,<15",
"rich>=14.1.0,<16",
"PyYAML~=6.0",
"ifdo>=1.4.0,<2",
"pillow>=12.1.1,<13",
Expand Down
7 changes: 2 additions & 5 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@

import pytest
import pytest_mock
from click.testing import Result
from typer.testing import CliRunner
from typer.testing import CliRunner, Result

_ANSI_ESCAPE_RE = re.compile(r"\x1b\[[0-9;?]*[A-Za-z]")

Expand Down Expand Up @@ -354,9 +353,7 @@ def assert_cli_success(result: Result, expected_message: str | None = None, cont

# Enhanced error reporting for failed commands
if result.exit_code != 0:
error_output = (
result.output if result.output else result.stderr if hasattr(result, "stderr") else "No output available"
)
error_output = result.output or (result.stderr if hasattr(result, "stderr") else "No output available")
msg = (
f"CLI command failed{error_context}:\n"
f"Exit code: {result.exit_code}\n"
Expand Down
2 changes: 1 addition & 1 deletion tests/core/schemas/test_darwin.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def hash_sha256(self) -> str | None:

@hash_sha256.setter
def hash_sha256(self, value: str) -> None:
self._hash = value if value else None
self._hash = value or None

@classmethod
def create_dataset_metadata(
Expand Down
2 changes: 1 addition & 1 deletion tests/core/utils/test_hash.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def test_compute_hash_file_read_error(self, mocker: pytest_mock.MockerFixture, t
mock_open_method.side_effect = OSError("Permission denied")

# Act & Assert
with pytest.raises(OSError, match="Failed to read file .*/test_file.txt: Permission denied"):
with pytest.raises(OSError, match=r"Failed to read file .*/test_file.txt: Permission denied"):
compute_hash(test_file)

@pytest.mark.unit
Expand Down
2 changes: 1 addition & 1 deletion tests/core/wrappers/test_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def test_load_root_without_config_raises_invalid_structure(self, tmp_path: Path)
root = tmp_path / "no_config"
root.mkdir()

with pytest.raises(CollectionWrapper.InvalidStructureError, match="collection.yml"):
with pytest.raises(CollectionWrapper.InvalidStructureError, match=r"collection.yml"):
CollectionWrapper(root)


Expand Down
Loading
Loading