runproof-engine 0.1.0__tar.gz → 0.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {runproof-engine-0.1.0 → runproof-engine-0.1.2}/PKG-INFO +1 -1
- {runproof-engine-0.1.0 → runproof-engine-0.1.2}/pyproject.toml +1 -1
- {runproof-engine-0.1.0 → runproof-engine-0.1.2}/src/runproof_engine/__init__.py +1 -1
- {runproof-engine-0.1.0 → runproof-engine-0.1.2}/src/runproof_engine/core.py +1 -1
- {runproof-engine-0.1.0 → runproof-engine-0.1.2}/src/runproof_engine.egg-info/PKG-INFO +1 -1
- {runproof-engine-0.1.0 → runproof-engine-0.1.2}/tests/test_core.py +17 -0
- {runproof-engine-0.1.0 → runproof-engine-0.1.2}/LICENSE +0 -0
- {runproof-engine-0.1.0 → runproof-engine-0.1.2}/README.md +0 -0
- {runproof-engine-0.1.0 → runproof-engine-0.1.2}/setup.cfg +0 -0
- {runproof-engine-0.1.0 → runproof-engine-0.1.2}/src/runproof_engine/cli.py +0 -0
- {runproof-engine-0.1.0 → runproof-engine-0.1.2}/src/runproof_engine/diff.py +0 -0
- {runproof-engine-0.1.0 → runproof-engine-0.1.2}/src/runproof_engine/policy.py +0 -0
- {runproof-engine-0.1.0 → runproof-engine-0.1.2}/src/runproof_engine/py.typed +0 -0
- {runproof-engine-0.1.0 → runproof-engine-0.1.2}/src/runproof_engine/replay.py +0 -0
- {runproof-engine-0.1.0 → runproof-engine-0.1.2}/src/runproof_engine/utils.py +0 -0
- {runproof-engine-0.1.0 → runproof-engine-0.1.2}/src/runproof_engine.egg-info/SOURCES.txt +0 -0
- {runproof-engine-0.1.0 → runproof-engine-0.1.2}/src/runproof_engine.egg-info/dependency_links.txt +0 -0
- {runproof-engine-0.1.0 → runproof-engine-0.1.2}/src/runproof_engine.egg-info/entry_points.txt +0 -0
- {runproof-engine-0.1.0 → runproof-engine-0.1.2}/src/runproof_engine.egg-info/requires.txt +0 -0
- {runproof-engine-0.1.0 → runproof-engine-0.1.2}/src/runproof_engine.egg-info/top_level.txt +0 -0
- {runproof-engine-0.1.0 → runproof-engine-0.1.2}/tests/test_cli.py +0 -0
- {runproof-engine-0.1.0 → runproof-engine-0.1.2}/tests/test_http.py +0 -0
|
@@ -122,7 +122,7 @@ class RunContext:
|
|
|
122
122
|
policy: Policy | None = None,
|
|
123
123
|
) -> None:
|
|
124
124
|
self.name = name
|
|
125
|
-
self.root = Path(root)
|
|
125
|
+
self.root = Path(root).expanduser().resolve()
|
|
126
126
|
self.copy_inputs = copy_inputs
|
|
127
127
|
self.capture_environment = capture_environment
|
|
128
128
|
self.fail_on_check = fail_on_check
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
|
+
import re
|
|
4
5
|
from pathlib import Path
|
|
5
6
|
|
|
6
7
|
import pytest
|
|
7
8
|
|
|
9
|
+
import runproof_engine
|
|
8
10
|
from runproof_engine import PolicyDenied, RunProofError, load_run, verified
|
|
9
11
|
|
|
10
12
|
|
|
@@ -21,6 +23,13 @@ def make_run(root: Path, input_path: Path, value: int) -> Path:
|
|
|
21
23
|
return run.result.artifact_dir
|
|
22
24
|
|
|
23
25
|
|
|
26
|
+
def test_package_version_matches_project_metadata() -> None:
|
|
27
|
+
project_text = (Path(__file__).parents[1] / "pyproject.toml").read_text(encoding="utf-8")
|
|
28
|
+
project_version = re.search(r'^version = "([^"]+)"$', project_text, re.MULTILINE)
|
|
29
|
+
assert project_version is not None
|
|
30
|
+
assert runproof_engine.__version__ == project_version.group(1)
|
|
31
|
+
|
|
32
|
+
|
|
24
33
|
def test_run_records_real_input_steps_output_and_checks(tmp_path: Path) -> None:
|
|
25
34
|
source = tmp_path / "source.txt"
|
|
26
35
|
source.write_text("real input\n", encoding="utf-8")
|
|
@@ -42,6 +51,14 @@ def test_run_records_real_input_steps_output_and_checks(tmp_path: Path) -> None:
|
|
|
42
51
|
assert loaded.replay(mode="strict").status == "replay_ready"
|
|
43
52
|
|
|
44
53
|
|
|
54
|
+
def test_relative_root_is_resolved_and_outputs_are_verifiable(tmp_path: Path, monkeypatch) -> None:
|
|
55
|
+
monkeypatch.chdir(tmp_path)
|
|
56
|
+
with verified("relative_root", root="runs") as run:
|
|
57
|
+
run.output("result.json", {"ok": True})
|
|
58
|
+
assert run.result.artifact_dir.is_absolute()
|
|
59
|
+
assert load_run(run.result.artifact_dir).verify_integrity().status == "verified"
|
|
60
|
+
|
|
61
|
+
|
|
45
62
|
def test_captured_input_can_verify_after_original_is_removed(tmp_path: Path) -> None:
|
|
46
63
|
source = tmp_path / "source.txt"
|
|
47
64
|
source.write_text("captured\n", encoding="utf-8")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{runproof-engine-0.1.0 → runproof-engine-0.1.2}/src/runproof_engine.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{runproof-engine-0.1.0 → runproof-engine-0.1.2}/src/runproof_engine.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|