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.
Files changed (77) hide show
  1. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/PKG-INFO +1 -1
  2. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/pyproject.toml +1 -1
  3. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/src/tenzir_test/cli.py +8 -1
  4. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/src/tenzir_test/run.py +5 -7
  5. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/tests/test_cli.py +9 -0
  6. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/tests/test_run_config.py +15 -0
  7. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/.gitignore +0 -0
  8. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/LICENSE +0 -0
  9. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/README.md +0 -0
  10. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/README.md +0 -0
  11. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/fixtures/README.md +0 -0
  12. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/fixtures/__init__.py +0 -0
  13. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/fixtures/http.py +0 -0
  14. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/fixtures/server.py +0 -0
  15. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/inputs/events.ndjson +0 -0
  16. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/runners/__init__.py +0 -0
  17. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/runners/xxd.py +0 -0
  18. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/context/01-context-create.tql +0 -0
  19. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/context/01-context-create.txt +0 -0
  20. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/context/02-context-update.tql +0 -0
  21. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/context/02-context-update.txt +0 -0
  22. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/context/03-context-inspect.tql +0 -0
  23. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/context/03-context-inspect.txt +0 -0
  24. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/context/test.yaml +0 -0
  25. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/hex/hello.txt +0 -0
  26. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/hex/hello.xxd +0 -0
  27. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/http-fixture.tql +0 -0
  28. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/http-fixture.txt +0 -0
  29. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/lazy.tql +0 -0
  30. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/node-fixture.tql +0 -0
  31. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/node-fixture.txt +0 -0
  32. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/python/executor-only/sum.py +0 -0
  33. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/python/executor-only/sum.txt +0 -0
  34. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/python/executor-with-http-fixture/request.py +0 -0
  35. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/python/executor-with-http-fixture/request.txt +0 -0
  36. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/python/executor-with-http-fixture/test.yaml +0 -0
  37. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/python/executor-with-node-fixture/context-manager.py +0 -0
  38. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/python/executor-with-node-fixture/context-manager.txt +0 -0
  39. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/python/fixture-driving/manual_control.py +0 -0
  40. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/python/fixture-driving/manual_control.txt +0 -0
  41. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/python/pure-python/flaky_coin.py +0 -0
  42. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/python/pure-python/flaky_coin.txt +0 -0
  43. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/python/pure-python/hello_world.py +0 -0
  44. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/python/pure-python/hello_world.txt +0 -0
  45. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/read-inputs.tql +0 -0
  46. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/read-inputs.txt +0 -0
  47. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/shell/http-fixture-check.sh +0 -0
  48. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/shell/tmp-dir.sh +0 -0
  49. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/example-project/tests/shell/tmp-dir.txt +0 -0
  50. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/src/tenzir_test/__init__.py +0 -0
  51. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/src/tenzir_test/_python_runner.py +0 -0
  52. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/src/tenzir_test/checks.py +0 -0
  53. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/src/tenzir_test/config.py +0 -0
  54. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/src/tenzir_test/engine/__init__.py +0 -0
  55. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/src/tenzir_test/engine/operations.py +0 -0
  56. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/src/tenzir_test/engine/registry.py +0 -0
  57. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/src/tenzir_test/engine/state.py +0 -0
  58. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/src/tenzir_test/engine/worker.py +0 -0
  59. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/src/tenzir_test/fixtures/__init__.py +0 -0
  60. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/src/tenzir_test/fixtures/node.py +0 -0
  61. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/src/tenzir_test/packages.py +0 -0
  62. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/src/tenzir_test/py.typed +0 -0
  63. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/src/tenzir_test/runners/__init__.py +0 -0
  64. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/src/tenzir_test/runners/_utils.py +0 -0
  65. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/src/tenzir_test/runners/custom_python_fixture_runner.py +0 -0
  66. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/src/tenzir_test/runners/diff_runner.py +0 -0
  67. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/src/tenzir_test/runners/ext_runner.py +0 -0
  68. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/src/tenzir_test/runners/runner.py +0 -0
  69. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/src/tenzir_test/runners/shell_runner.py +0 -0
  70. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/src/tenzir_test/runners/tenzir_runner.py +0 -0
  71. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/src/tenzir_test/runners/tql_runner.py +0 -0
  72. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/tests/test_config.py +0 -0
  73. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/tests/test_engine_operations.py +0 -0
  74. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/tests/test_python_runner.py +0 -0
  75. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/tests/test_run.py +0 -0
  76. {tenzir_test-0.9.2 → tenzir_test-0.9.3}/tests/test_runner_registry.py +0 -0
  77. {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.2
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
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "tenzir-test"
3
- version = "0.9.2"
3
+ version = "0.9.3"
4
4
  description = "Reusable test execution framework extracted from the Tenzir repository."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.12"
@@ -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 not None:
1333
- tests_dir = package_root / "tests"
1334
- if tests_dir.is_dir():
1335
- yield tests_dir
1336
- return
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