tenzir-test 0.13.1__tar.gz → 0.14.0__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.
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/.gitignore +3 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/PKG-INFO +1 -1
- tenzir_test-0.14.0/changelog/config.yaml +6 -0
- tenzir_test-0.14.0/changelog/releases/v0.14.0/entries/inline-test-inputs-and-local-inputs-directories.md +22 -0
- tenzir_test-0.14.0/changelog/releases/v0.14.0/manifest.yaml +7 -0
- tenzir_test-0.14.0/changelog/releases/v0.14.0/notes.md +22 -0
- tenzir_test-0.14.0/example-project/tests/local-inputs/inputs/local-data.ndjson +2 -0
- tenzir_test-0.14.0/example-project/tests/local-inputs/read-local.tql +3 -0
- tenzir_test-0.14.0/example-project/tests/local-inputs/read-local.txt +4 -0
- tenzir_test-0.14.0/example-project/tests/read-inline-input.input +3 -0
- tenzir_test-0.14.0/example-project/tests/read-inline-input.tql +5 -0
- tenzir_test-0.14.0/example-project/tests/read-inline-input.txt +8 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/pyproject.toml +1 -1
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/src/tenzir_test/run.py +43 -13
- tenzir_test-0.13.1/changelog/config.yaml +0 -4
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/LICENSE +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/README.md +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/changelog/releases/v0.11.0/entries/01-expose-tenzir-test-as-a-library.md +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/changelog/releases/v0.11.0/manifest.yaml +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/changelog/releases/v0.11.0/notes.md +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/changelog/releases/v0.12.0/entries/01-honor-no-color-for-python-api-consumers.md +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/changelog/releases/v0.12.0/manifest.yaml +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/changelog/releases/v0.12.0/notes.md +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/changelog/releases/v0.13.0/entries/01-improve-diagnostics-when-tenzir-node-fails-to-start.md +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/changelog/releases/v0.13.0/entries/01-library-mode-and-package-dirs.md +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/changelog/releases/v0.13.0/manifest.yaml +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/changelog/releases/v0.13.0/notes.md +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/changelog/releases/v0.13.1/entries/strip-root-paths-from-diff-runner-output.md +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/changelog/releases/v0.13.1/manifest.yaml +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/changelog/releases/v0.13.1/notes.md +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-library/README.md +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-library/bar/operators/double.tql +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-library/bar/package.yaml +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-library/bar/test.yaml +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-library/bar/tests/use-foo.tql +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-library/bar/tests/use-foo.txt +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-library/foo/operators/increment.tql +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-library/foo/package.yaml +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-library/foo/test.yaml +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-library/foo/tests/use-bar.tql +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-library/foo/tests/use-bar.txt +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-package/operators/deeply/nested/twist.tql +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-package/operators/filter.tql +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-package/operators/parse.tql +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-package/package.yaml +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-package/tests/context/01-context-list.tql +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-package/tests/context/01-context-list.txt +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-package/tests/context/02-context-update.tql +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-package/tests/context/02-context-update.txt +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-package/tests/context/03-context-inspect.tql +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-package/tests/context/03-context-inspect.txt +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-package/tests/context/test.yaml +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-package/tests/inputs/sample.log +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-package/tests/ops.tql +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-package/tests/ops.txt +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-package/tests/twist.tql +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-package/tests/twist.txt +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/README.md +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/fixtures/README.md +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/fixtures/__init__.py +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/fixtures/http.py +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/fixtures/server.py +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/inputs/events.ndjson +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/runners/__init__.py +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/runners/xxd.py +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/tests/context/01-context-create.tql +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/tests/context/01-context-create.txt +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/tests/context/02-context-update.tql +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/tests/context/02-context-update.txt +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/tests/context/03-context-inspect.tql +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/tests/context/03-context-inspect.txt +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/tests/context/test.yaml +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/tests/fail.tql +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/tests/fail.txt +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/tests/hex/hello.txt +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/tests/hex/hello.xxd +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/tests/http-fixture.tql +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/tests/http-fixture.txt +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/tests/lazy.tql +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/tests/lazy.txt +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/tests/node-fixture.tql +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/tests/node-fixture.txt +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/tests/python/executor-only/sum.py +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/tests/python/executor-only/sum.txt +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/tests/python/executor-with-http-fixture/request.py +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/tests/python/executor-with-http-fixture/request.txt +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/tests/python/executor-with-http-fixture/test.yaml +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/tests/python/executor-with-node-fixture/context-manager.py +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/tests/python/executor-with-node-fixture/context-manager.txt +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/tests/python/fixture-driving/manual_control.py +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/tests/python/fixture-driving/manual_control.txt +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/tests/python/pure-python/flaky_coin.py +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/tests/python/pure-python/flaky_coin.txt +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/tests/python/pure-python/hello_world.py +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/tests/python/pure-python/hello_world.txt +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/tests/read-inputs.tql +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/tests/read-inputs.txt +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/tests/shell/exit-code-test.sh +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/tests/shell/exit-code-test.txt +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/tests/shell/http-fixture-check.sh +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/tests/shell/http-fixture-check.txt +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/tests/shell/tmp-dir.sh +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/tests/shell/tmp-dir.txt +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-satellite/README.md +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-satellite/fixtures.py +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-satellite/inputs/input.txt +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-satellite/tests/hex/reuse.txt +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-satellite/tests/hex/reuse.xxd +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-satellite/tests/satellite/input.sh +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-satellite/tests/satellite/input.txt +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-satellite/tests/satellite/marker.sh +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-satellite/tests/satellite/marker.txt +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-satellite/tests/satellite/test.yaml +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/src/tenzir_test/__init__.py +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/src/tenzir_test/_python_runner.py +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/src/tenzir_test/cli.py +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/src/tenzir_test/config.py +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/src/tenzir_test/engine/__init__.py +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/src/tenzir_test/engine/operations.py +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/src/tenzir_test/engine/registry.py +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/src/tenzir_test/engine/state.py +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/src/tenzir_test/engine/worker.py +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/src/tenzir_test/fixtures/__init__.py +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/src/tenzir_test/fixtures/node.py +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/src/tenzir_test/packages.py +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/src/tenzir_test/py.typed +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/src/tenzir_test/runners/__init__.py +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/src/tenzir_test/runners/_utils.py +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/src/tenzir_test/runners/custom_python_fixture_runner.py +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/src/tenzir_test/runners/diff_runner.py +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/src/tenzir_test/runners/ext_runner.py +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/src/tenzir_test/runners/runner.py +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/src/tenzir_test/runners/shell_runner.py +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/src/tenzir_test/runners/tenzir_runner.py +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/src/tenzir_test/runners/tql_runner.py +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/tests/test_cli.py +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/tests/test_config.py +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/tests/test_engine_operations.py +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/tests/test_python_runner.py +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/tests/test_run.py +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/tests/test_run_config.py +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/tests/test_runner_registry.py +0 -0
- {tenzir_test-0.13.1 → tenzir_test-0.14.0}/tests/test_shell_runner.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tenzir-test
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.14.0
|
|
4
4
|
Summary: Reusable test execution framework extracted from the Tenzir repository.
|
|
5
5
|
Project-URL: Homepage, https://github.com/tenzir/test
|
|
6
6
|
Project-URL: Repository, https://github.com/tenzir/test
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Inline test inputs and local inputs directories
|
|
3
|
+
type: feature
|
|
4
|
+
authors:
|
|
5
|
+
- mavam
|
|
6
|
+
- claude
|
|
7
|
+
created: 2026-01-15T14:30:30.462557Z
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
The test harness now supports inline test inputs for better test organization in deeply nested test hierarchies.
|
|
11
|
+
|
|
12
|
+
Tests can now place input data directly alongside test files using the `.input` extension. The harness automatically sets the `TENZIR_INPUT` environment variable pointing to `<test>.input` when the file exists. This makes test dependencies immediately visible without requiring you to navigate to a distant `inputs/` directory.
|
|
13
|
+
|
|
14
|
+
Additionally, you can now create `inputs/` directories at any level in the test hierarchy. The harness walks up from each test and uses the nearest `inputs/` directory for `TENZIR_INPUTS`, with shadowing semantics where nearer directories take precedence. This lets you organize shared test data close to the tests that use it.
|
|
15
|
+
|
|
16
|
+
The resolution hierarchy for `TENZIR_INPUTS` is:
|
|
17
|
+
1. `inputs:` override in test frontmatter or `test.yaml` (highest priority)
|
|
18
|
+
2. Nearest `inputs/` directory walking up from the test
|
|
19
|
+
3. Package-level `tests/inputs/` directory
|
|
20
|
+
4. Project-level `inputs/` directory (fallback)
|
|
21
|
+
|
|
22
|
+
All existing tests continue to work with the global `inputs/` directory.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
created: 2026-01-15
|
|
2
|
+
title: Inline Test Inputs
|
|
3
|
+
intro: >-
|
|
4
|
+
This release introduces inline test inputs for better test organization in deeply
|
|
5
|
+
nested hierarchies. Tests can now place input data directly alongside test files,
|
|
6
|
+
and you can create local `inputs/` directories at any level with automatic shadowing
|
|
7
|
+
semantics.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
This release introduces inline test inputs for better test organization in deeply nested hierarchies. Tests can now place input data directly alongside test files, and you can create local `inputs/` directories at any level with automatic shadowing semantics.
|
|
2
|
+
|
|
3
|
+
## 🚀 Features
|
|
4
|
+
|
|
5
|
+
### Inline test inputs and local inputs directories
|
|
6
|
+
|
|
7
|
+
The test harness now supports inline test inputs for better test organization in deeply nested test hierarchies.
|
|
8
|
+
|
|
9
|
+
Tests can now place input data directly alongside test files using the `.input` extension. The harness automatically sets the `TENZIR_INPUT` environment variable pointing to `<test>.input` when the file exists. This makes test dependencies immediately visible without requiring you to navigate to a distant `inputs/` directory.
|
|
10
|
+
|
|
11
|
+
Additionally, you can now create `inputs/` directories at any level in the test hierarchy. The harness walks up from each test and uses the nearest `inputs/` directory for `TENZIR_INPUTS`, with shadowing semantics where nearer directories take precedence. This lets you organize shared test data close to the tests that use it.
|
|
12
|
+
|
|
13
|
+
The resolution hierarchy for `TENZIR_INPUTS` is:
|
|
14
|
+
|
|
15
|
+
1. `inputs:` override in test frontmatter or `test.yaml` (highest priority)
|
|
16
|
+
1. Nearest `inputs/` directory walking up from the test
|
|
17
|
+
1. Package-level `tests/inputs/` directory
|
|
18
|
+
1. Project-level `inputs/` directory (fallback)
|
|
19
|
+
|
|
20
|
+
All existing tests continue to work with the global `inputs/` directory.
|
|
21
|
+
|
|
22
|
+
*By @mavam and @claude.*
|
|
@@ -1641,20 +1641,12 @@ def _iter_project_test_directories(root: Path) -> Iterator[Path]:
|
|
|
1641
1641
|
|
|
1642
1642
|
|
|
1643
1643
|
def _is_inputs_path(path: Path) -> bool:
|
|
1644
|
-
"""Return True when the path lives under
|
|
1644
|
+
"""Return True when the path lives under any inputs directory."""
|
|
1645
1645
|
try:
|
|
1646
1646
|
parts = path.relative_to(ROOT).parts
|
|
1647
1647
|
except ValueError:
|
|
1648
1648
|
parts = path.parts
|
|
1649
|
-
|
|
1650
|
-
for index, part in enumerate(parts):
|
|
1651
|
-
if part != "inputs":
|
|
1652
|
-
continue
|
|
1653
|
-
if index == 0:
|
|
1654
|
-
return True
|
|
1655
|
-
if index > 0 and parts[index - 1] == "tests":
|
|
1656
|
-
return True
|
|
1657
|
-
return False
|
|
1649
|
+
return "inputs" in parts
|
|
1658
1650
|
|
|
1659
1651
|
|
|
1660
1652
|
def _refresh_registry() -> None:
|
|
@@ -1687,6 +1679,25 @@ def _resolve_inputs_dir(root: Path) -> Path:
|
|
|
1687
1679
|
return direct
|
|
1688
1680
|
|
|
1689
1681
|
|
|
1682
|
+
def _find_nearest_inputs_dir(test: Path, root: Path) -> Path | None:
|
|
1683
|
+
"""Walk up from test directory to find nearest inputs/ directory.
|
|
1684
|
+
|
|
1685
|
+
Returns the nearest inputs/ directory between the test and root,
|
|
1686
|
+
or None if no inputs/ directory exists in that range.
|
|
1687
|
+
"""
|
|
1688
|
+
current = test.parent
|
|
1689
|
+
root_resolved = root.resolve()
|
|
1690
|
+
while True:
|
|
1691
|
+
candidate = current / "inputs"
|
|
1692
|
+
if candidate.is_dir():
|
|
1693
|
+
return candidate
|
|
1694
|
+
# Stop when we reach or pass the root
|
|
1695
|
+
if current.resolve() == root_resolved or current == current.parent:
|
|
1696
|
+
break
|
|
1697
|
+
current = current.parent
|
|
1698
|
+
return None
|
|
1699
|
+
|
|
1700
|
+
|
|
1690
1701
|
def _looks_like_project_root(path: Path) -> bool:
|
|
1691
1702
|
"""Return True when the path or one of its parents resembles a project root."""
|
|
1692
1703
|
|
|
@@ -1818,13 +1829,22 @@ def get_test_env_and_config_args(
|
|
|
1818
1829
|
config_args = [f"--config={config_file}"] if config_file.exists() else []
|
|
1819
1830
|
env = os.environ.copy()
|
|
1820
1831
|
if inputs is None:
|
|
1821
|
-
|
|
1832
|
+
# Try nearest inputs/ directory first, fall back to project-level
|
|
1833
|
+
nearest = _find_nearest_inputs_dir(test, ROOT)
|
|
1834
|
+
if nearest is not None:
|
|
1835
|
+
inputs_path = str(nearest.resolve())
|
|
1836
|
+
else:
|
|
1837
|
+
inputs_path = str(_resolve_inputs_dir(ROOT).resolve())
|
|
1822
1838
|
else:
|
|
1823
1839
|
candidate = Path(os.fspath(inputs))
|
|
1824
1840
|
if not candidate.is_absolute():
|
|
1825
1841
|
candidate = test.parent / candidate
|
|
1826
1842
|
inputs_path = str(candidate.resolve())
|
|
1827
1843
|
env["TENZIR_INPUTS"] = inputs_path
|
|
1844
|
+
# Check for inline input file (.input extension)
|
|
1845
|
+
inline_input = test.with_suffix(".input")
|
|
1846
|
+
if inline_input.is_file():
|
|
1847
|
+
env["TENZIR_INPUT"] = str(inline_input.resolve())
|
|
1828
1848
|
if config_file.exists():
|
|
1829
1849
|
env.setdefault("TENZIR_CONFIG", str(config_file))
|
|
1830
1850
|
if node_config_file.exists():
|
|
@@ -2853,7 +2873,12 @@ def run_simple_test(
|
|
|
2853
2873
|
env["TENZIR_PACKAGE_ROOT"] = str(package_root)
|
|
2854
2874
|
package_tests_root = package_root / "tests"
|
|
2855
2875
|
if inputs_override is None:
|
|
2856
|
-
|
|
2876
|
+
# Try nearest inputs/ directory, fall back to package-level
|
|
2877
|
+
nearest = _find_nearest_inputs_dir(test, package_root)
|
|
2878
|
+
if nearest is not None:
|
|
2879
|
+
env["TENZIR_INPUTS"] = str(nearest.resolve())
|
|
2880
|
+
else:
|
|
2881
|
+
env["TENZIR_INPUTS"] = str(package_tests_root / "inputs")
|
|
2857
2882
|
package_dir_candidates.append(str(package_root))
|
|
2858
2883
|
package_dir_candidates.extend(additional_package_dirs)
|
|
2859
2884
|
for cli_path in _get_cli_packages():
|
|
@@ -3128,7 +3153,12 @@ class Worker:
|
|
|
3128
3153
|
if package_root is not None:
|
|
3129
3154
|
env["TENZIR_PACKAGE_ROOT"] = str(package_root)
|
|
3130
3155
|
if inputs_override is None:
|
|
3131
|
-
|
|
3156
|
+
# Try nearest inputs/ directory, fall back to package-level
|
|
3157
|
+
nearest = _find_nearest_inputs_dir(primary_test, package_root)
|
|
3158
|
+
if nearest is not None:
|
|
3159
|
+
env["TENZIR_INPUTS"] = str(nearest.resolve())
|
|
3160
|
+
else:
|
|
3161
|
+
env["TENZIR_INPUTS"] = str((package_root / "tests" / "inputs"))
|
|
3132
3162
|
package_dir_candidates.append(str(package_root))
|
|
3133
3163
|
package_dir_candidates.extend(additional_package_dirs)
|
|
3134
3164
|
for cli_path in _get_cli_packages():
|
|
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
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
{tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-package/tests/context/02-context-update.tql
RENAMED
|
File without changes
|
{tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-package/tests/context/02-context-update.txt
RENAMED
|
File without changes
|
{tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-package/tests/context/03-context-inspect.tql
RENAMED
|
File without changes
|
{tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-package/tests/context/03-context-inspect.txt
RENAMED
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/tests/context/01-context-create.tql
RENAMED
|
File without changes
|
{tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/tests/context/01-context-create.txt
RENAMED
|
File without changes
|
{tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/tests/context/02-context-update.tql
RENAMED
|
File without changes
|
{tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/tests/context/02-context-update.txt
RENAMED
|
File without changes
|
{tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/tests/context/03-context-inspect.tql
RENAMED
|
File without changes
|
{tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/tests/context/03-context-inspect.txt
RENAMED
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/tests/python/executor-only/sum.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/tests/python/pure-python/flaky_coin.py
RENAMED
|
File without changes
|
{tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/tests/python/pure-python/flaky_coin.txt
RENAMED
|
File without changes
|
{tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/tests/python/pure-python/hello_world.py
RENAMED
|
File without changes
|
{tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/tests/python/pure-python/hello_world.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tenzir_test-0.13.1 → tenzir_test-0.14.0}/example-project/tests/shell/http-fixture-check.txt
RENAMED
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tenzir_test-0.13.1 → tenzir_test-0.14.0}/src/tenzir_test/runners/custom_python_fixture_runner.py
RENAMED
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|