Buckets:

download
raw
872 Bytes
from __future__ import annotations
from collections.abc import Callable
from pathlib import Path
from typing import Final
import pytest
HARNESS_ROOT: Final = Path(__file__).resolve().parents[2]
@pytest.fixture(autouse=True)
def subprocess_test_environment(monkeypatch: pytest.MonkeyPatch) -> None:
monkeypatch.setenv("PYTHONPATH", str(HARNESS_ROOT))
monkeypatch.setenv("PYTEST_DISABLE_PLUGIN_AUTOLOAD", "1")
@pytest.fixture
def cargo_project(tmp_path: Path) -> Callable[[str, str], Path]:
def create(package: str, source: str) -> Path:
manifest: Final = tmp_path / "Cargo.toml"
manifest.write_text(
f'[package]\nname = "{package}"\nversion = "0.1.0"\nedition = "2021"\n[workspace]\n'
)
(tmp_path / "src").mkdir()
(tmp_path / "src/lib.rs").write_text(source)
return manifest
return create

Xet Storage Details

Size:
872 Bytes
·
Xet hash:
7265cf4bddd31b832eabd15fdf52682b843d4e2a81babe2af9ffeae8d2650a31

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.