tenzir-test 0.9.2__tar.gz → 0.9.3__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.9.2 → tenzir_test-0.9.3}/PKG-INFO +1 -1
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/pyproject.toml +1 -1
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/src/tenzir_test/cli.py +8 -1
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/src/tenzir_test/run.py +5 -7
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/tests/test_cli.py +9 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/tests/test_run_config.py +15 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/.gitignore +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/LICENSE +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/README.md +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/README.md +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/fixtures/README.md +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/fixtures/__init__.py +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/fixtures/http.py +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/fixtures/server.py +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/inputs/events.ndjson +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/runners/__init__.py +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/runners/xxd.py +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/context/01-context-create.tql +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/context/01-context-create.txt +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/context/02-context-update.tql +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/context/02-context-update.txt +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/context/03-context-inspect.tql +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/context/03-context-inspect.txt +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/context/test.yaml +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/hex/hello.txt +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/hex/hello.xxd +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/http-fixture.tql +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/http-fixture.txt +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/lazy.tql +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/node-fixture.tql +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/node-fixture.txt +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/python/executor-only/sum.py +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/python/executor-only/sum.txt +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/python/executor-with-http-fixture/request.py +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/python/executor-with-http-fixture/request.txt +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/python/executor-with-http-fixture/test.yaml +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/python/executor-with-node-fixture/context-manager.py +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/python/executor-with-node-fixture/context-manager.txt +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/python/fixture-driving/manual_control.py +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/python/fixture-driving/manual_control.txt +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/python/pure-python/flaky_coin.py +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/python/pure-python/flaky_coin.txt +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/python/pure-python/hello_world.py +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/python/pure-python/hello_world.txt +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/read-inputs.tql +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/read-inputs.txt +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/shell/http-fixture-check.sh +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/shell/tmp-dir.sh +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/shell/tmp-dir.txt +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/src/tenzir_test/__init__.py +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/src/tenzir_test/_python_runner.py +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/src/tenzir_test/checks.py +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/src/tenzir_test/config.py +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/src/tenzir_test/engine/__init__.py +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/src/tenzir_test/engine/operations.py +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/src/tenzir_test/engine/registry.py +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/src/tenzir_test/engine/state.py +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/src/tenzir_test/engine/worker.py +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/src/tenzir_test/fixtures/__init__.py +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/src/tenzir_test/fixtures/node.py +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/src/tenzir_test/packages.py +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/src/tenzir_test/py.typed +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/src/tenzir_test/runners/__init__.py +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/src/tenzir_test/runners/_utils.py +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/src/tenzir_test/runners/custom_python_fixture_runner.py +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/src/tenzir_test/runners/diff_runner.py +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/src/tenzir_test/runners/ext_runner.py +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/src/tenzir_test/runners/runner.py +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/src/tenzir_test/runners/shell_runner.py +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/src/tenzir_test/runners/tenzir_runner.py +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/src/tenzir_test/runners/tql_runner.py +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/tests/test_config.py +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/tests/test_engine_operations.py +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/tests/test_python_runner.py +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/tests/test_run.py +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/tests/test_runner_registry.py +0 -0
- {tenzir_test-0.9.2 → tenzir_test-0.9.3}/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.9.
|
|
3
|
+
Version: 0.9.3
|
|
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
|
|
@@ -8,7 +8,7 @@ import sys
|
|
|
8
8
|
|
|
9
9
|
import click
|
|
10
10
|
|
|
11
|
-
from . import run as runtime
|
|
11
|
+
from . import __version__, run as runtime
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
def _normalize_exit_code(value: object) -> int:
|
|
@@ -24,6 +24,13 @@ def _normalize_exit_code(value: object) -> int:
|
|
|
24
24
|
@click.command(
|
|
25
25
|
context_settings={"help_option_names": ["-h", "--help"]},
|
|
26
26
|
)
|
|
27
|
+
@click.version_option(
|
|
28
|
+
__version__,
|
|
29
|
+
"-V",
|
|
30
|
+
"--version",
|
|
31
|
+
prog_name="tenzir-test",
|
|
32
|
+
message="%(prog)s %(version)s",
|
|
33
|
+
)
|
|
27
34
|
@click.option(
|
|
28
35
|
"root",
|
|
29
36
|
"--root",
|
|
@@ -1329,13 +1329,11 @@ def _iter_project_test_directories(root: Path) -> Iterator[Path]:
|
|
|
1329
1329
|
yield root
|
|
1330
1330
|
return
|
|
1331
1331
|
package_root = _DETECTED_PACKAGE_ROOT
|
|
1332
|
-
if package_root is
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
if root.is_dir():
|
|
1338
|
-
yield root
|
|
1332
|
+
if package_root is None:
|
|
1333
|
+
return
|
|
1334
|
+
tests_dir = package_root / "tests"
|
|
1335
|
+
if tests_dir.is_dir():
|
|
1336
|
+
yield tests_dir
|
|
1339
1337
|
return
|
|
1340
1338
|
|
|
1341
1339
|
package_dirs = list(packages.iter_package_dirs(root))
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
import pytest
|
|
4
|
+
import tenzir_test
|
|
4
5
|
|
|
5
6
|
from tenzir_test import cli
|
|
6
7
|
|
|
@@ -108,6 +109,14 @@ def test_cli_summary_flag(monkeypatch: pytest.MonkeyPatch) -> None:
|
|
|
108
109
|
assert captured["show_summary"] is True
|
|
109
110
|
|
|
110
111
|
|
|
112
|
+
def test_cli_version_flag(capsys: pytest.CaptureFixture[str]) -> None:
|
|
113
|
+
exit_code = cli.main(["--version"])
|
|
114
|
+
assert exit_code == 0
|
|
115
|
+
captured = capsys.readouterr()
|
|
116
|
+
assert captured.out.strip() == f"tenzir-test {tenzir_test.__version__}"
|
|
117
|
+
assert captured.err == ""
|
|
118
|
+
|
|
119
|
+
|
|
111
120
|
def test_cli_unknown_option(capsys: pytest.CaptureFixture[str]) -> None:
|
|
112
121
|
exit_code = cli.main(["--details"])
|
|
113
122
|
assert exit_code == 2
|
|
@@ -412,6 +412,21 @@ def test_iter_project_test_directories_prefers_package_tests(configured_root: Pa
|
|
|
412
412
|
assert discovered == [tests_dir]
|
|
413
413
|
|
|
414
414
|
|
|
415
|
+
def test_iter_project_test_directories_ignores_package_without_tests(
|
|
416
|
+
configured_root: Path,
|
|
417
|
+
) -> None:
|
|
418
|
+
package = configured_root / "satellite"
|
|
419
|
+
package.mkdir()
|
|
420
|
+
(package / "package.yaml").write_text("name: satellite\n", encoding="utf-8")
|
|
421
|
+
run._set_project_root(package)
|
|
422
|
+
try:
|
|
423
|
+
discovered = list(run._iter_project_test_directories(package))
|
|
424
|
+
finally:
|
|
425
|
+
run._set_project_root(configured_root)
|
|
426
|
+
|
|
427
|
+
assert discovered == []
|
|
428
|
+
|
|
429
|
+
|
|
415
430
|
def test_detect_execution_mode_for_package_root(tmp_path: Path) -> None:
|
|
416
431
|
package_root = tmp_path / "pkg"
|
|
417
432
|
package_root.mkdir()
|
|
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.9.2 → tenzir_test-0.9.3}/example-project/tests/context/03-context-inspect.tql
RENAMED
|
File without changes
|
{tenzir_test-0.9.2 → tenzir_test-0.9.3}/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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/python/pure-python/flaky_coin.py
RENAMED
|
File without changes
|
{tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/python/pure-python/flaky_coin.txt
RENAMED
|
File without changes
|
{tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/python/pure-python/hello_world.py
RENAMED
|
File without changes
|
{tenzir_test-0.9.2 → tenzir_test-0.9.3}/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
|
|
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.9.2 → tenzir_test-0.9.3}/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
|