update pip install .copy manifest for developments
This commit is contained in:
+22
-2
@@ -57,13 +57,33 @@ def test_pyproject_bundle_manifest(packaging_utils):
|
||||
assert all("/" in path and "*" not in path for path in config_files)
|
||||
assert any(path.endswith(".json") for path in config_files)
|
||||
|
||||
sensor_dirs = [dest for dest in data_files if dest.startswith("orisys/sensors/")]
|
||||
sensor_dirs = [dest for dest in data_files if dest.startswith("orisys/sensors")]
|
||||
assert sensor_dirs
|
||||
assert any("finger/assets" in dest for dest in sensor_dirs)
|
||||
all_sensor_files = [path for files in (data_files[d] for d in sensor_dirs) for path in files]
|
||||
assert any(path.endswith("force_calibration.json") for path in all_sensor_files)
|
||||
assert any("finger" in path and path.endswith(".json") for path in all_sensor_files)
|
||||
# Finger mesh/viz assets (flat or nested assets/finger/ checkout).
|
||||
assert any("finger/assets" in dest or any("finger/assets" in p for p in data_files[dest]) for dest in sensor_dirs)
|
||||
assert all("*" not in path for files in data_files.values() for path in files)
|
||||
assert "examples" not in data_files
|
||||
|
||||
|
||||
def test_stage_dev_bundle_into_writes_sensors_under_package(tmp_path):
|
||||
import sys
|
||||
|
||||
build_dir = REPO_ROOT / "build"
|
||||
if str(build_dir) not in sys.path:
|
||||
sys.path.insert(0, str(build_dir))
|
||||
from common.pyproject_utils import stage_dev_bundle_into
|
||||
|
||||
pkg = tmp_path / "orisys"
|
||||
packaged = stage_dev_bundle_into(REPO_ROOT, pkg)
|
||||
assert any(p.replace("\\", "/").endswith("sensors/box/force_calibration.json") for p in packaged)
|
||||
assert (pkg / "sensors" / "box" / "force_calibration.json").is_file()
|
||||
assert (pkg / "configs").is_dir()
|
||||
assert any((pkg / "configs").glob("*.json"))
|
||||
|
||||
|
||||
def test_bundle_explicit_files():
|
||||
import sys
|
||||
|
||||
|
||||
Reference in New Issue
Block a user