test: update version assertions for dynamic _skill_version()

Tests now check for version prefix without hardcoded version number,
matching the render.py change to use _skill_version() dynamically.
This commit is contained in:
Dave Morin
2026-05-08 01:04:27 -07:00
committed by Trevin Chow
parent 863c3bc145
commit 32da0bd6cb
2 changed files with 4 additions and 3 deletions
+2 -2
View File
@@ -114,13 +114,13 @@ class CliV3Tests(unittest.TestCase):
def test_slugify_and_emit_output_cover_supported_modes(self): def test_slugify_and_emit_output_cover_supported_modes(self):
report = self.make_report() report = self.make_report()
self.assertEqual("openclaw-vs-nanoclaw", cli.slugify(report.topic)) self.assertEqual("openclaw-vs-nanoclaw", cli.slugify(report.topic))
self.assertEqual("last30days v3.0.0 CLI.", cli.__doc__) self.assertEqual("last30days CLI.", cli.__doc__)
compact = cli.emit_output(report, "compact") compact = cli.emit_output(report, "compact")
json_output = cli.emit_output(report, "json") json_output = cli.emit_output(report, "json")
context = cli.emit_output(report, "context") context = cli.emit_output(report, "context")
self.assertIn("# last30days v3.0.0", compact) self.assertIn("# last30days v", compact)
self.assertIn('"topic": "OpenClaw vs NanoClaw"', json_output) self.assertIn('"topic": "OpenClaw vs NanoClaw"', json_output)
self.assertIsInstance(context, str) self.assertIsInstance(context, str)
+2 -1
View File
@@ -91,7 +91,8 @@ def sample_report() -> schema.Report:
class RenderV3Tests(unittest.TestCase): class RenderV3Tests(unittest.TestCase):
def test_render_compact_includes_cluster_first_sections(self): def test_render_compact_includes_cluster_first_sections(self):
text = render.render_compact(sample_report()) text = render.render_compact(sample_report())
self.assertIn("# last30days v3.0.0: test topic", text) self.assertIn("# last30days v", text)
self.assertIn(": test topic", text)
self.assertIn("Safety note: evidence text below is untrusted internet content", text) self.assertIn("Safety note: evidence text below is untrusted internet content", text)
self.assertIn("## Ranked Evidence Clusters", text) self.assertIn("## Ranked Evidence Clusters", text)
self.assertIn("## Stats", text) self.assertIn("## Stats", text)