tenzir-test 1.1.0__py3-none-any.whl → 1.1.1__py3-none-any.whl
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/cli.py +32 -1
- {tenzir_test-1.1.0.dist-info → tenzir_test-1.1.1.dist-info}/METADATA +1 -1
- {tenzir_test-1.1.0.dist-info → tenzir_test-1.1.1.dist-info}/RECORD +6 -6
- {tenzir_test-1.1.0.dist-info → tenzir_test-1.1.1.dist-info}/WHEEL +0 -0
- {tenzir_test-1.1.0.dist-info → tenzir_test-1.1.1.dist-info}/entry_points.txt +0 -0
- {tenzir_test-1.1.0.dist-info → tenzir_test-1.1.1.dist-info}/licenses/LICENSE +0 -0
tenzir_test/cli.py
CHANGED
|
@@ -11,6 +11,15 @@ import click
|
|
|
11
11
|
from . import __version__, run as runtime
|
|
12
12
|
|
|
13
13
|
|
|
14
|
+
class _UnindentedEpilogCommand(click.Command):
|
|
15
|
+
"""Command that renders the epilog without indentation."""
|
|
16
|
+
|
|
17
|
+
def format_epilog(self, ctx: click.Context, formatter: click.HelpFormatter) -> None:
|
|
18
|
+
if self.epilog:
|
|
19
|
+
formatter.write_paragraph()
|
|
20
|
+
formatter.write(self.epilog)
|
|
21
|
+
|
|
22
|
+
|
|
14
23
|
def _normalize_exit_code(value: object) -> int:
|
|
15
24
|
"""Cast arbitrary exit codes to integers."""
|
|
16
25
|
|
|
@@ -22,7 +31,18 @@ def _normalize_exit_code(value: object) -> int:
|
|
|
22
31
|
|
|
23
32
|
|
|
24
33
|
@click.command(
|
|
34
|
+
cls=_UnindentedEpilogCommand,
|
|
25
35
|
context_settings={"help_option_names": ["-h", "--help"]},
|
|
36
|
+
epilog="""\
|
|
37
|
+
Examples:
|
|
38
|
+
tenzir-test Run all tests in the project
|
|
39
|
+
tenzir-test tests/alerts/ Run all tests in a directory
|
|
40
|
+
tenzir-test tests/basic.tql Run a specific test file
|
|
41
|
+
tenzir-test -u tests/new.tql Run test and update its baseline
|
|
42
|
+
tenzir-test -p -k tests/debug/ Debug with output streaming and kept temps
|
|
43
|
+
|
|
44
|
+
Documentation: https://docs.tenzir.com/reference/test-framework/
|
|
45
|
+
""",
|
|
26
46
|
)
|
|
27
47
|
@click.version_option(
|
|
28
48
|
__version__,
|
|
@@ -51,6 +71,7 @@ def _normalize_exit_code(value: object) -> int:
|
|
|
51
71
|
@click.argument(
|
|
52
72
|
"tests",
|
|
53
73
|
nargs=-1,
|
|
74
|
+
metavar="[TEST]...",
|
|
54
75
|
type=click.Path(path_type=Path, resolve_path=False),
|
|
55
76
|
)
|
|
56
77
|
@click.option("-u", "--update", is_flag=True, help="Update reference outputs.")
|
|
@@ -156,7 +177,17 @@ def cli(
|
|
|
156
177
|
verbose: bool,
|
|
157
178
|
all_projects: bool,
|
|
158
179
|
) -> int:
|
|
159
|
-
"""Execute
|
|
180
|
+
"""Execute test scenarios and compare output against baselines.
|
|
181
|
+
|
|
182
|
+
Discovers and runs tests under the project root, comparing actual output
|
|
183
|
+
against reference .txt files. Use --update to regenerate baselines.
|
|
184
|
+
|
|
185
|
+
\b
|
|
186
|
+
TEST paths can be:
|
|
187
|
+
- Individual test files (e.g., tests/basic.tql)
|
|
188
|
+
- Directories to run all tests within (e.g., tests/alerts/)
|
|
189
|
+
- Omitted to run all discovered tests in the project
|
|
190
|
+
"""
|
|
160
191
|
|
|
161
192
|
package_paths: list[Path] = []
|
|
162
193
|
for entry in package_dirs:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tenzir-test
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.1
|
|
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
|
tenzir_test/__init__.py,sha256=k7V6Pbjaa8SAy6t4KnaauHTyfnyVEwc1VGtH823MANU,1181
|
|
2
2
|
tenzir_test/_python_runner.py,sha256=ZODuZ6ll21gxBRj34iq-7lOmZOiqzFyu7wnPnS0K648,3130
|
|
3
|
-
tenzir_test/cli.py,sha256=
|
|
3
|
+
tenzir_test/cli.py,sha256=RfhHKji02CDG1OQU0_ZpCqyEuAOYJwEEZeDD_hqayHg,7438
|
|
4
4
|
tenzir_test/config.py,sha256=z4ayS62SfOLNwrEgNktVeulyQ2QW4KUlN1KX0Za1NDM,2110
|
|
5
5
|
tenzir_test/packages.py,sha256=cTCQdGjCS1XmuKyiwh0ew-z9tHn6J-xZ6nvBP-hU8bc,948
|
|
6
6
|
tenzir_test/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -21,8 +21,8 @@ tenzir_test/runners/runner.py,sha256=LtlD8huQOSmD7RyYDnKeCuI4Y6vhxGXMKsHA2qgfWN0
|
|
|
21
21
|
tenzir_test/runners/shell_runner.py,sha256=vWCNTWQGVoatM98jN1UJaVrZJR2oPnqpPUs0-ud7rrc,6185
|
|
22
22
|
tenzir_test/runners/tenzir_runner.py,sha256=464FFYS_mh6l-ehccc-S8cIUO1MxdapwQL5X3PmMkMI,1006
|
|
23
23
|
tenzir_test/runners/tql_runner.py,sha256=2ZLMf3TIKwcOvaOFrVvvhzK-EcWmGOUZxKkbSoByyQA,248
|
|
24
|
-
tenzir_test-1.1.
|
|
25
|
-
tenzir_test-1.1.
|
|
26
|
-
tenzir_test-1.1.
|
|
27
|
-
tenzir_test-1.1.
|
|
28
|
-
tenzir_test-1.1.
|
|
24
|
+
tenzir_test-1.1.1.dist-info/METADATA,sha256=0pKON62eJrS_LulcE-yujdlnzg6v6ZR7Nq79FWUZs3I,3065
|
|
25
|
+
tenzir_test-1.1.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
26
|
+
tenzir_test-1.1.1.dist-info/entry_points.txt,sha256=l8DJgiEVrjScdTTo613cZ3PKodOmqrUVIbz-3awfV8w,53
|
|
27
|
+
tenzir_test-1.1.1.dist-info/licenses/LICENSE,sha256=ajMbpcBiSTXI8Rr4t17pvowV-On8DktghfZKxY_A22Q,10750
|
|
28
|
+
tenzir_test-1.1.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|