1+ from pacta import PACTA_VERSION
12from pacta .reporting .renderers .github import GitHubReportRenderer
23from pacta .reporting .types import (
34 DiffSummary ,
@@ -23,7 +24,7 @@ def _make_run(**overrides):
2324 baseline_ref = "baseline" ,
2425 mode = "full" ,
2526 created_at = "2025-01-22T12:00:00+00:00" ,
26- tool_version = "0.0.7" ,
27+ tool_version = PACTA_VERSION ,
2728 metadata = {},
2829 )
2930 defaults .update (overrides )
@@ -71,7 +72,7 @@ def _make_report(*, violations=(), diff=None, trends=None, baseline_ref="baselin
7172
7273 return Report (
7374 tool = "pacta" ,
74- version = "0.0.7" ,
75+ version = PACTA_VERSION ,
7576 run = _make_run (baseline_ref = baseline_ref ),
7677 summary = Summary (
7778 total_violations = len (all_v ),
@@ -99,7 +100,7 @@ def test_header_includes_branch_and_commit(self):
99100 def test_no_branch_or_commit (self ):
100101 report = Report (
101102 tool = "pacta" ,
102- version = "0.0.7" ,
103+ version = PACTA_VERSION ,
103104 run = _make_run (branch = None , commit = None , baseline_ref = None ),
104105 summary = Summary (total_violations = 0 , by_severity = {}, by_status = {}, by_rule = {}, engine_errors = 0 ),
105106 violations = (),
@@ -239,7 +240,7 @@ def test_footer_includes_version(self):
239240 report = _make_report ()
240241 out = GitHubReportRenderer ().render (report )
241242 assert "Pacta" in out
242- assert "v0.0.7" in out
243+ assert PACTA_VERSION in out
243244
244245
245246class TestGitHubRendererFullOutput :
0 commit comments