tenzir-test 0.15.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.
Files changed (145) hide show
  1. tenzir_test-0.15.0/.gitignore +43 -0
  2. tenzir_test-0.15.0/LICENSE +190 -0
  3. tenzir_test-0.15.0/PKG-INFO +81 -0
  4. tenzir_test-0.15.0/README.md +52 -0
  5. tenzir_test-0.15.0/changelog/config.yaml +6 -0
  6. tenzir_test-0.15.0/changelog/releases/v0.11.0/entries/01-expose-tenzir-test-as-a-library.md +27 -0
  7. tenzir_test-0.15.0/changelog/releases/v0.11.0/manifest.yaml +4 -0
  8. tenzir_test-0.15.0/changelog/releases/v0.11.0/notes.md +23 -0
  9. tenzir_test-0.15.0/changelog/releases/v0.12.0/entries/01-honor-no-color-for-python-api-consumers.md +16 -0
  10. tenzir_test-0.15.0/changelog/releases/v0.12.0/manifest.yaml +4 -0
  11. tenzir_test-0.15.0/changelog/releases/v0.12.0/notes.md +17 -0
  12. tenzir_test-0.15.0/changelog/releases/v0.13.0/entries/01-improve-diagnostics-when-tenzir-node-fails-to-start.md +12 -0
  13. tenzir_test-0.15.0/changelog/releases/v0.13.0/entries/01-library-mode-and-package-dirs.md +32 -0
  14. tenzir_test-0.15.0/changelog/releases/v0.13.0/manifest.yaml +4 -0
  15. tenzir_test-0.15.0/changelog/releases/v0.13.0/notes.md +29 -0
  16. tenzir_test-0.15.0/changelog/releases/v0.13.1/entries/strip-root-paths-from-diff-runner-output.md +11 -0
  17. tenzir_test-0.15.0/changelog/releases/v0.13.1/manifest.yaml +5 -0
  18. tenzir_test-0.15.0/changelog/releases/v0.13.1/notes.md +9 -0
  19. tenzir_test-0.15.0/changelog/releases/v0.14.0/entries/inline-test-inputs-and-local-inputs-directories.md +22 -0
  20. tenzir_test-0.15.0/changelog/releases/v0.14.0/manifest.yaml +7 -0
  21. tenzir_test-0.15.0/changelog/releases/v0.14.0/notes.md +22 -0
  22. tenzir_test-0.15.0/changelog/releases/v0.15.0/entries/verbose-output-flag-for-test-results.md +19 -0
  23. tenzir_test-0.15.0/changelog/releases/v0.15.0/manifest.yaml +6 -0
  24. tenzir_test-0.15.0/changelog/releases/v0.15.0/notes.md +17 -0
  25. tenzir_test-0.15.0/example-library/README.md +43 -0
  26. tenzir_test-0.15.0/example-library/bar/operators/double.tql +1 -0
  27. tenzir_test-0.15.0/example-library/bar/package.yaml +4 -0
  28. tenzir_test-0.15.0/example-library/bar/test.yaml +2 -0
  29. tenzir_test-0.15.0/example-library/bar/tests/use-foo.tql +2 -0
  30. tenzir_test-0.15.0/example-library/bar/tests/use-foo.txt +3 -0
  31. tenzir_test-0.15.0/example-library/foo/operators/increment.tql +1 -0
  32. tenzir_test-0.15.0/example-library/foo/package.yaml +4 -0
  33. tenzir_test-0.15.0/example-library/foo/test.yaml +2 -0
  34. tenzir_test-0.15.0/example-library/foo/tests/use-bar.tql +2 -0
  35. tenzir_test-0.15.0/example-library/foo/tests/use-bar.txt +3 -0
  36. tenzir_test-0.15.0/example-package/operators/deeply/nested/twist.tql +7 -0
  37. tenzir_test-0.15.0/example-package/operators/filter.tql +1 -0
  38. tenzir_test-0.15.0/example-package/operators/parse.tql +2 -0
  39. tenzir_test-0.15.0/example-package/package.yaml +29 -0
  40. tenzir_test-0.15.0/example-package/tests/context/01-context-list.tql +2 -0
  41. tenzir_test-0.15.0/example-package/tests/context/01-context-list.txt +5 -0
  42. tenzir_test-0.15.0/example-package/tests/context/02-context-update.tql +4 -0
  43. tenzir_test-0.15.0/example-package/tests/context/02-context-update.txt +0 -0
  44. tenzir_test-0.15.0/example-package/tests/context/03-context-inspect.tql +1 -0
  45. tenzir_test-0.15.0/example-package/tests/context/03-context-inspect.txt +12 -0
  46. tenzir_test-0.15.0/example-package/tests/context/test.yaml +2 -0
  47. tenzir_test-0.15.0/example-package/tests/inputs/sample.log +12 -0
  48. tenzir_test-0.15.0/example-package/tests/ops.tql +4 -0
  49. tenzir_test-0.15.0/example-package/tests/ops.txt +15 -0
  50. tenzir_test-0.15.0/example-package/tests/twist.tql +4 -0
  51. tenzir_test-0.15.0/example-package/tests/twist.txt +12 -0
  52. tenzir_test-0.15.0/example-project/README.md +111 -0
  53. tenzir_test-0.15.0/example-project/fixtures/README.md +83 -0
  54. tenzir_test-0.15.0/example-project/fixtures/__init__.py +8 -0
  55. tenzir_test-0.15.0/example-project/fixtures/http.py +58 -0
  56. tenzir_test-0.15.0/example-project/fixtures/server.py +42 -0
  57. tenzir_test-0.15.0/example-project/inputs/events.ndjson +3 -0
  58. tenzir_test-0.15.0/example-project/runners/__init__.py +6 -0
  59. tenzir_test-0.15.0/example-project/runners/xxd.py +71 -0
  60. tenzir_test-0.15.0/example-project/tests/context/01-context-create.tql +1 -0
  61. tenzir_test-0.15.0/example-project/tests/context/01-context-create.txt +0 -0
  62. tenzir_test-0.15.0/example-project/tests/context/02-context-update.tql +4 -0
  63. tenzir_test-0.15.0/example-project/tests/context/02-context-update.txt +0 -0
  64. tenzir_test-0.15.0/example-project/tests/context/03-context-inspect.tql +1 -0
  65. tenzir_test-0.15.0/example-project/tests/context/03-context-inspect.txt +12 -0
  66. tenzir_test-0.15.0/example-project/tests/context/test.yaml +4 -0
  67. tenzir_test-0.15.0/example-project/tests/fail.tql +3 -0
  68. tenzir_test-0.15.0/example-project/tests/fail.txt +28 -0
  69. tenzir_test-0.15.0/example-project/tests/hex/hello.txt +1 -0
  70. tenzir_test-0.15.0/example-project/tests/hex/hello.xxd +1 -0
  71. tenzir_test-0.15.0/example-project/tests/http-fixture.tql +9 -0
  72. tenzir_test-0.15.0/example-project/tests/http-fixture.txt +4 -0
  73. tenzir_test-0.15.0/example-project/tests/lazy.tql +5 -0
  74. tenzir_test-0.15.0/example-project/tests/lazy.txt +0 -0
  75. tenzir_test-0.15.0/example-project/tests/local-inputs/inputs/local-data.ndjson +2 -0
  76. tenzir_test-0.15.0/example-project/tests/local-inputs/read-local.tql +3 -0
  77. tenzir_test-0.15.0/example-project/tests/local-inputs/read-local.txt +4 -0
  78. tenzir_test-0.15.0/example-project/tests/node-fixture.tql +28 -0
  79. tenzir_test-0.15.0/example-project/tests/node-fixture.txt +6 -0
  80. tenzir_test-0.15.0/example-project/tests/python/executor-only/sum.py +6 -0
  81. tenzir_test-0.15.0/example-project/tests/python/executor-only/sum.txt +10 -0
  82. tenzir_test-0.15.0/example-project/tests/python/executor-with-http-fixture/request.py +7 -0
  83. tenzir_test-0.15.0/example-project/tests/python/executor-with-http-fixture/request.txt +3 -0
  84. tenzir_test-0.15.0/example-project/tests/python/executor-with-http-fixture/test.yaml +3 -0
  85. tenzir_test-0.15.0/example-project/tests/python/executor-with-node-fixture/context-manager.py +13 -0
  86. tenzir_test-0.15.0/example-project/tests/python/executor-with-node-fixture/context-manager.txt +3 -0
  87. tenzir_test-0.15.0/example-project/tests/python/fixture-driving/manual_control.py +24 -0
  88. tenzir_test-0.15.0/example-project/tests/python/fixture-driving/manual_control.txt +5 -0
  89. tenzir_test-0.15.0/example-project/tests/python/pure-python/flaky_coin.py +5 -0
  90. tenzir_test-0.15.0/example-project/tests/python/pure-python/flaky_coin.txt +1 -0
  91. tenzir_test-0.15.0/example-project/tests/python/pure-python/hello_world.py +6 -0
  92. tenzir_test-0.15.0/example-project/tests/python/pure-python/hello_world.txt +1 -0
  93. tenzir_test-0.15.0/example-project/tests/read-inline-input.input +3 -0
  94. tenzir_test-0.15.0/example-project/tests/read-inline-input.tql +5 -0
  95. tenzir_test-0.15.0/example-project/tests/read-inline-input.txt +8 -0
  96. tenzir_test-0.15.0/example-project/tests/read-inputs.tql +2 -0
  97. tenzir_test-0.15.0/example-project/tests/read-inputs.txt +8 -0
  98. tenzir_test-0.15.0/example-project/tests/shell/exit-code-test.sh +8 -0
  99. tenzir_test-0.15.0/example-project/tests/shell/exit-code-test.txt +2 -0
  100. tenzir_test-0.15.0/example-project/tests/shell/http-fixture-check.sh +20 -0
  101. tenzir_test-0.15.0/example-project/tests/shell/http-fixture-check.txt +0 -0
  102. tenzir_test-0.15.0/example-project/tests/shell/tmp-dir.sh +8 -0
  103. tenzir_test-0.15.0/example-project/tests/shell/tmp-dir.txt +2 -0
  104. tenzir_test-0.15.0/example-satellite/README.md +27 -0
  105. tenzir_test-0.15.0/example-satellite/fixtures.py +14 -0
  106. tenzir_test-0.15.0/example-satellite/inputs/input.txt +1 -0
  107. tenzir_test-0.15.0/example-satellite/tests/hex/reuse.txt +2 -0
  108. tenzir_test-0.15.0/example-satellite/tests/hex/reuse.xxd +1 -0
  109. tenzir_test-0.15.0/example-satellite/tests/satellite/input.sh +2 -0
  110. tenzir_test-0.15.0/example-satellite/tests/satellite/input.txt +2 -0
  111. tenzir_test-0.15.0/example-satellite/tests/satellite/marker.sh +4 -0
  112. tenzir_test-0.15.0/example-satellite/tests/satellite/marker.txt +1 -0
  113. tenzir_test-0.15.0/example-satellite/tests/satellite/test.yaml +3 -0
  114. tenzir_test-0.15.0/pyproject.toml +132 -0
  115. tenzir_test-0.15.0/src/tenzir_test/__init__.py +56 -0
  116. tenzir_test-0.15.0/src/tenzir_test/_python_runner.py +93 -0
  117. tenzir_test-0.15.0/src/tenzir_test/cli.py +243 -0
  118. tenzir_test-0.15.0/src/tenzir_test/config.py +57 -0
  119. tenzir_test-0.15.0/src/tenzir_test/engine/__init__.py +5 -0
  120. tenzir_test-0.15.0/src/tenzir_test/engine/operations.py +36 -0
  121. tenzir_test-0.15.0/src/tenzir_test/engine/registry.py +30 -0
  122. tenzir_test-0.15.0/src/tenzir_test/engine/state.py +43 -0
  123. tenzir_test-0.15.0/src/tenzir_test/engine/worker.py +8 -0
  124. tenzir_test-0.15.0/src/tenzir_test/fixtures/__init__.py +614 -0
  125. tenzir_test-0.15.0/src/tenzir_test/fixtures/node.py +334 -0
  126. tenzir_test-0.15.0/src/tenzir_test/packages.py +33 -0
  127. tenzir_test-0.15.0/src/tenzir_test/py.typed +0 -0
  128. tenzir_test-0.15.0/src/tenzir_test/run.py +3904 -0
  129. tenzir_test-0.15.0/src/tenzir_test/runners/__init__.py +164 -0
  130. tenzir_test-0.15.0/src/tenzir_test/runners/_utils.py +17 -0
  131. tenzir_test-0.15.0/src/tenzir_test/runners/custom_python_fixture_runner.py +171 -0
  132. tenzir_test-0.15.0/src/tenzir_test/runners/diff_runner.py +144 -0
  133. tenzir_test-0.15.0/src/tenzir_test/runners/ext_runner.py +28 -0
  134. tenzir_test-0.15.0/src/tenzir_test/runners/runner.py +38 -0
  135. tenzir_test-0.15.0/src/tenzir_test/runners/shell_runner.py +158 -0
  136. tenzir_test-0.15.0/src/tenzir_test/runners/tenzir_runner.py +37 -0
  137. tenzir_test-0.15.0/src/tenzir_test/runners/tql_runner.py +13 -0
  138. tenzir_test-0.15.0/tests/test_cli.py +199 -0
  139. tenzir_test-0.15.0/tests/test_config.py +42 -0
  140. tenzir_test-0.15.0/tests/test_engine_operations.py +58 -0
  141. tenzir_test-0.15.0/tests/test_python_runner.py +362 -0
  142. tenzir_test-0.15.0/tests/test_run.py +1583 -0
  143. tenzir_test-0.15.0/tests/test_run_config.py +832 -0
  144. tenzir_test-0.15.0/tests/test_runner_registry.py +163 -0
  145. tenzir_test-0.15.0/tests/test_shell_runner.py +192 -0
@@ -0,0 +1,43 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # Distribution / packaging
7
+ .build/
8
+ build/
9
+ dist/
10
+ *.egg-info/
11
+ .eggs/
12
+
13
+ # Virtual environments
14
+ .venv/
15
+ .python-env/
16
+
17
+ # uv artifacts
18
+ .uv/
19
+ uv.lock.bak
20
+
21
+ # Coverage reports
22
+ htmlcov/
23
+ .coverage
24
+ coverage.xml
25
+ *.py,cover
26
+ *.profraw
27
+
28
+ # Test / pytest cache
29
+ .pytest_cache/
30
+
31
+ # Mypy / Ruff / other tooling caches
32
+ .mypy_cache/
33
+ .ruff_cache/
34
+
35
+ # Editor junk
36
+ *.swp
37
+ *.swo
38
+ .DS_Store
39
+ .vscode/
40
+ .idea/
41
+
42
+ # Documentation (separate repository)
43
+ .docs/
@@ -0,0 +1,190 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ Copyright 2024 Tenzir
179
+
180
+ Licensed under the Apache License, Version 2.0 (the "License");
181
+ you may not use this file except in compliance with the License.
182
+ You may obtain a copy of the License at
183
+
184
+ http://www.apache.org/licenses/LICENSE-2.0
185
+
186
+ Unless required by applicable law or agreed to in writing, software
187
+ distributed under the License is distributed on an "AS IS" BASIS,
188
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
189
+ See the License for the specific language governing permissions and
190
+ limitations under the License.
@@ -0,0 +1,81 @@
1
+ Metadata-Version: 2.4
2
+ Name: tenzir-test
3
+ Version: 0.15.0
4
+ Summary: Reusable test execution framework extracted from the Tenzir repository.
5
+ Project-URL: Homepage, https://github.com/tenzir/test
6
+ Project-URL: Repository, https://github.com/tenzir/test
7
+ Project-URL: Bug Tracker, https://github.com/tenzir/test/issues
8
+ Project-URL: Documentation, https://docs.tenzir.com
9
+ Author-email: Tenzir <engineering@tenzir.com>
10
+ Maintainer-email: Tenzir Engineering <engineering@tenzir.com>
11
+ License: Apache-2.0
12
+ License-File: LICENSE
13
+ Keywords: automation,pytest,tenzir,testing
14
+ Classifier: Development Status :: 4 - Beta
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: License :: OSI Approved :: Apache Software License
17
+ Classifier: Operating System :: OS Independent
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
22
+ Classifier: Topic :: Software Development :: Quality Assurance
23
+ Classifier: Topic :: Software Development :: Testing
24
+ Classifier: Typing :: Typed
25
+ Requires-Python: >=3.12
26
+ Requires-Dist: click>=8.1
27
+ Requires-Dist: pyyaml>=6.0
28
+ Description-Content-Type: text/markdown
29
+
30
+ # 🧪 tenzir-test
31
+
32
+ `tenzir-test` is the reusable test harness that powers the
33
+ [Tenzir](https://github.com/tenzir/tenzir) project. It discovers test scenarios
34
+ and Python fixtures, prepares the execution environment, and produces artifacts
35
+ you can diff against established baselines.
36
+
37
+ ## ✨ Highlights
38
+
39
+ - 🔍 Auto-discovers tests, inputs, and configuration across both project and
40
+ package layouts, including linked satellite projects.
41
+ - 🧩 Supports configurable runners and reusable fixtures so you can tailor how
42
+ scenarios execute and share setup logic.
43
+ - 🛠️ Provides a `tenzir-test` CLI for orchestrating suites, updating baselines,
44
+ and inspecting artifacts.
45
+
46
+ ## 📦 Installation
47
+
48
+ Install the latest release from PyPI with `uvx`—`tenzir-test` requires Python
49
+ 3.12 or newer:
50
+
51
+ ```sh
52
+ uvx tenzir-test --help
53
+ ```
54
+
55
+ `uvx` downloads the newest compatible release, runs it in an isolated
56
+ environment, and caches subsequent invocations for fast reuse.
57
+
58
+ ## 📚 Documentation
59
+
60
+ Consult our [user guide](https://docs.tenzir.com/guides/testing/write-tests)
61
+ for an end-to-end walkthrough of writing tests.
62
+
63
+ We also provide a dense [reference](https://docs.tenzir.com/reference/test) that
64
+ explains concepts, configuration, multi-project execution, and CLI details.
65
+
66
+ ## 🗞️ Releases
67
+
68
+ New versions are published to PyPI through trusted publishing when a GitHub
69
+ release is created. Review the latest release notes on GitHub for details about
70
+ what's new.
71
+
72
+ ## 🤝 Contributing
73
+
74
+ Want to contribute? We're all-in on agentic coding with [Claude
75
+ Code](https://claude.ai/code)! The repo comes pre-configured with our [custom
76
+ plugins](https://github.com/tenzir/claude-plugins)—just clone and start hacking.
77
+
78
+ ## 📜 License
79
+
80
+ `tenzir-test` is available under the Apache License, Version 2.0. See
81
+ [`LICENSE`](LICENSE) for details.
@@ -0,0 +1,52 @@
1
+ # 🧪 tenzir-test
2
+
3
+ `tenzir-test` is the reusable test harness that powers the
4
+ [Tenzir](https://github.com/tenzir/tenzir) project. It discovers test scenarios
5
+ and Python fixtures, prepares the execution environment, and produces artifacts
6
+ you can diff against established baselines.
7
+
8
+ ## ✨ Highlights
9
+
10
+ - 🔍 Auto-discovers tests, inputs, and configuration across both project and
11
+ package layouts, including linked satellite projects.
12
+ - 🧩 Supports configurable runners and reusable fixtures so you can tailor how
13
+ scenarios execute and share setup logic.
14
+ - 🛠️ Provides a `tenzir-test` CLI for orchestrating suites, updating baselines,
15
+ and inspecting artifacts.
16
+
17
+ ## 📦 Installation
18
+
19
+ Install the latest release from PyPI with `uvx`—`tenzir-test` requires Python
20
+ 3.12 or newer:
21
+
22
+ ```sh
23
+ uvx tenzir-test --help
24
+ ```
25
+
26
+ `uvx` downloads the newest compatible release, runs it in an isolated
27
+ environment, and caches subsequent invocations for fast reuse.
28
+
29
+ ## 📚 Documentation
30
+
31
+ Consult our [user guide](https://docs.tenzir.com/guides/testing/write-tests)
32
+ for an end-to-end walkthrough of writing tests.
33
+
34
+ We also provide a dense [reference](https://docs.tenzir.com/reference/test) that
35
+ explains concepts, configuration, multi-project execution, and CLI details.
36
+
37
+ ## 🗞️ Releases
38
+
39
+ New versions are published to PyPI through trusted publishing when a GitHub
40
+ release is created. Review the latest release notes on GitHub for details about
41
+ what's new.
42
+
43
+ ## 🤝 Contributing
44
+
45
+ Want to contribute? We're all-in on agentic coding with [Claude
46
+ Code](https://claude.ai/code)! The repo comes pre-configured with our [custom
47
+ plugins](https://github.com/tenzir/claude-plugins)—just clone and start hacking.
48
+
49
+ ## 📜 License
50
+
51
+ `tenzir-test` is available under the Apache License, Version 2.0. See
52
+ [`LICENSE`](LICENSE) for details.
@@ -0,0 +1,6 @@
1
+ id: tenzir-test
2
+ name: Tenzir Test
3
+ description: >-
4
+ An integration testing framework that discovers tests, runs them with managed
5
+ fixtures, and validates output against baselines.
6
+ repository: tenzir/test
@@ -0,0 +1,27 @@
1
+ ---
2
+ title: Expose tenzir-test as a library
3
+ type: feature
4
+ authors:
5
+ - mavam
6
+ - codex
7
+ created: 2025-11-04
8
+ ---
9
+
10
+ The test framework now exposes its harness as a reusable Python library,
11
+ returning structured execution results instead of exiting the process. Callers
12
+ can import the new `execute` helper and receive an `ExecutionResult` with
13
+ project summaries, exit codes, and failure details for downstream automation.
14
+
15
+ Example:
16
+
17
+ ```python
18
+ from pathlib import Path
19
+
20
+ from tenzir_test import ExecutionResult, execute
21
+
22
+ result: ExecutionResult = execute(tests=[Path("tests/pipeline.tql")])
23
+ if result.exit_code:
24
+ raise SystemExit(result.exit_code)
25
+ for project in result.project_results:
26
+ print(project.selection.root, project.summary.total)
27
+ ```
@@ -0,0 +1,4 @@
1
+ created: 2025-11-04
2
+ title: Tenzir Test v0.11.0
3
+ intro: >-
4
+ Expose tenzir-test as a reusable Python library.
@@ -0,0 +1,23 @@
1
+ Expose tenzir-test as a reusable Python library.
2
+
3
+ ## 🚀 Features
4
+
5
+ ### Expose tenzir-test as a library
6
+
7
+ The test framework now exposes its harness as a reusable Python library, returning structured execution results instead of exiting the process. Callers can import the new `execute` helper and receive an `ExecutionResult` with project summaries, exit codes, and failure details for downstream automation.
8
+
9
+ Example:
10
+
11
+ ```python
12
+ from pathlib import Path
13
+
14
+ from tenzir_test import ExecutionResult, execute
15
+
16
+ result: ExecutionResult = execute(tests=[Path("tests/pipeline.tql")])
17
+ if result.exit_code:
18
+ raise SystemExit(result.exit_code)
19
+ for project in result.project_results:
20
+ print(project.selection.root, project.summary.total)
21
+ ```
22
+
23
+ *By @mavam and @codex.*
@@ -0,0 +1,16 @@
1
+ ---
2
+ title: Add configurable color output control
3
+ type: feature
4
+ authors:
5
+ - codex
6
+ - mavam
7
+ created: 2025-11-05
8
+ ---
9
+
10
+ We default library consumers to plain output, keep the CLI smart about ANSI usage, and honour `NO_COLOR` across every helper while locking the behaviour down with tests.
11
+
12
+ When you `import tenzir_test.run`, the harness now emits unstyled text so CI logs stay machine-readable. You can still opt back into colours via `run.set_color_mode(run.ColorMode.ALWAYS)` or let auto-detection pick the best option.
13
+
14
+ Running `tenzir-test` in a terminal still shows coloured summaries, but redirecting stdout—or exporting `NO_COLOR=1`—forces the palette to plain text, covering diff hunks, failure trees, retry banners, and runner diagnostics.
15
+
16
+ A single palette helper now drives every glyph and symbol, and pytest coverage exercises CLI, library, and `NO_COLOR` modes to catch regressions immediately.
@@ -0,0 +1,4 @@
1
+ created: 2025-11-05
2
+ title: Tenzir Test 0.12.0
3
+ intro: >-
4
+ Minor release with improved NO_COLOR handling.
@@ -0,0 +1,17 @@
1
+ Minor release with improved NO_COLOR handling.
2
+
3
+ ## 🚀 Features
4
+
5
+ ### Add configurable color output control
6
+
7
+ We switched library consumers to plain output by default and added full `NO_COLOR` support, keeping ANSI colors only where they enhance the interactive experience.
8
+
9
+ When you `import tenzir_test.run` directly, the harness now emits unstyled text by default—perfect for log parsers, CI systems, and automation scripts that expect machine-readable output. If you need colors back, call `run.set_color_mode(run.ColorMode.ALWAYS)` to force ANSI sequences on, or use `run.ColorMode.AUTO` to let the harness detect terminal capabilities.
10
+
11
+ The `tenzir-test` CLI continues to auto-detect your terminal and renders colors when you run tests interactively. Redirect stdout to a file or pipe, and it automatically switches to plain mode. Set `NO_COLOR=1` in your environment, and every output—failure trees, diff hunks, retry banners—strips its color codes.
12
+
13
+ All palette logic now lives in a single helper that colorizes checkmarks, crosses, diff lines, and progress indicators consistently. This unification means `run.print_diff(...)` respects your color mode choice everywhere, whether you invoke it from the CLI or from library code.
14
+
15
+ We added pytest coverage for all three modes—CLI with colors, library without colors, and `NO_COLOR=1` forcing plain output—so future changes won't break the contract.
16
+
17
+ *By @codex and @mavam.*
@@ -0,0 +1,12 @@
1
+ ---
2
+ title: Improve diagnostics when Tenzir Node fails to start
3
+ type: change
4
+ authors:
5
+ - Alainx277
6
+ - claude
7
+ prs:
8
+ - 2
9
+ created: 2025-12-02
10
+ ---
11
+
12
+ The `node` fixture now reports the exit code and stderr output when `tenzir-node` fails to start, making it easier to diagnose startup failures. Previously, the error message provided no context about why the node failed to produce an endpoint.
@@ -0,0 +1,32 @@
1
+ ---
2
+ title: Library mode and extra packages
3
+ type: feature
4
+ authors:
5
+ - codex
6
+ - mavam
7
+ prs:
8
+ - 4
9
+ created: 2025-12-02
10
+ ---
11
+
12
+ Explicit package loading for tests: use `--package-dirs` (repeatable, accepts
13
+ comma-separated lists) to point the harness at package directories. The same
14
+ flag is passed to the Tenzir binaries, and it merges with any `package-dirs:`
15
+ declared in directory `test.yaml` files. Entries are normalized and
16
+ de-duplicated, then exported via `TENZIR_PACKAGE_DIRS` for fixtures.
17
+
18
+ The test configuration uses the same spelling: add
19
+
20
+ ```yaml
21
+ package-dirs:
22
+ - ../shared-packages
23
+ - /opt/tenzir/packages/foo
24
+ ```
25
+
26
+ to a directory `test.yaml` when you want those packages available for the tests
27
+ below it.
28
+
29
+ Example: `uvx tenzir-test --package-dirs example-library example-library`
30
+ loads both `foo` and `bar` packages so their operators can cross-import. The
31
+ example-library `test.yaml` files demonstrate the config-based approach if you
32
+ prefer not to pass the `--package-dirs` flag.
@@ -0,0 +1,4 @@
1
+ created: 2025-12-03
2
+ title: Tenzir Test v0.13.0
3
+ intro: >-
4
+ This release adds `--package-dirs` support and improves startup diagnostics.
@@ -0,0 +1,29 @@
1
+ This release adds `--package-dirs` support and improves startup diagnostics.
2
+
3
+ ## 🚀 Features
4
+
5
+ ### Library mode and extra packages
6
+
7
+ Explicit package loading for tests: use `--package-dirs` (repeatable, accepts comma-separated lists) to point the harness at package directories. The same flag is passed to the Tenzir binaries, and it merges with any `package-dirs:` declared in directory `test.yaml` files. Entries are normalized and de-duplicated, then exported via `TENZIR_PACKAGE_DIRS` for fixtures.
8
+
9
+ The test configuration uses the same spelling: add
10
+
11
+ ```yaml
12
+ package-dirs:
13
+ - ../shared-packages
14
+ - /opt/tenzir/packages/foo
15
+ ```
16
+
17
+ to a directory `test.yaml` when you want those packages available for the tests below it.
18
+
19
+ Example: `uvx tenzir-test --package-dirs example-library example-library` loads both `foo` and `bar` packages so their operators can cross-import. The example-library `test.yaml` files demonstrate the config-based approach if you prefer not to pass the `--package-dirs` flag.
20
+
21
+ *By @codex and @mavam in [#4](https://github.com/tenzir/test/pull/4).*
22
+
23
+ ## 🔧 Changes
24
+
25
+ ### Improve diagnostics when Tenzir Node fails to start
26
+
27
+ The `node` fixture now reports the exit code and stderr output when `tenzir-node` fails to start, making it easier to diagnose startup failures. Previously, the error message provided no context about why the node failed to produce an endpoint.
28
+
29
+ *By @Alainx277 and @claude in [#2](https://github.com/tenzir/test/pull/2).*
@@ -0,0 +1,11 @@
1
+ ---
2
+ title: Strip root paths from diff_runner output
3
+ type: bugfix
4
+ authors:
5
+ - tobim
6
+ - claude
7
+ pr: 5
8
+ created: 2025-12-08T15:44:59.615542Z
9
+ ---
10
+
11
+ The `DiffRunner` now strips the ROOT path prefix from output to make paths relative, consistent with `run_simple_test` behavior.
@@ -0,0 +1,5 @@
1
+ created: 2025-12-08
2
+ title: Tenzir Test v0.13.1
3
+ intro: >-
4
+ This release fixes path handling in the diff runner to strip root path prefixes
5
+ from output, making paths relative and consistent with other test runners.
@@ -0,0 +1,9 @@
1
+ This release fixes path handling in the diff runner to strip root path prefixes from output, making paths relative and consistent with other test runners.
2
+
3
+ ## 🐞 Bug fixes
4
+
5
+ ### Strip root paths from diff_runner output
6
+
7
+ The `DiffRunner` now strips the ROOT path prefix from output to make paths relative, consistent with `run_simple_test` behavior.
8
+
9
+ *By @tobim and @claude in [#5](https://github.com/tenzir/test/pull/5).*
@@ -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.*