mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-11 13:17:07 +00:00
fix(cli): make the architecture legend's split strings explicit
py/implicit-string-concatenation-in-list on PR #625 (architecture.py:147, :151): one table row and one paragraph were split over lines without parentheses; both are now parenthesized, likewise the f-string row ruff ISC004 flags. The new test pins four two-cell rows and one paragraph and fails with a comma inserted. 🎯 Fix: 97 % 💥 Break: 1 % 💸 Cost: – ⏱️ Time: – 🛡️ Security: ~100 % 🏆 Score: 96 🚦 Gate: ✅ 90/5, cost and time <= 100, security 100 % Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ae9907df81
commit
0914910df5
2 files changed
+39
-13
No files matched your search
@@ -0,0 +1,22 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import unittest
|
||||
|
||||
from cli.build.docs.readme.architecture import _volumes_legend
|
||||
|
||||
|
||||
class TestVolumesLegend(unittest.TestCase):
|
||||
def test_each_table_row_is_one_item_with_the_columns_of_the_header(self):
|
||||
rows = [line for line in _volumes_legend() if line.startswith("|")]
|
||||
self.assertEqual([3, 3, 3, 3], [row.count("|") for row in rows])
|
||||
self.assertIn("role not pinned | shared over NFS |", rows[2])
|
||||
|
||||
def test_the_explanation_below_the_table_is_one_paragraph(self):
|
||||
prose = [line for line in _volumes_legend() if line and line[0] != "|"]
|
||||
self.assertEqual(1, len(prose))
|
||||
self.assertTrue(prose[0].startswith("All four conditions must hold"))
|
||||
self.assertTrue(prose[0].endswith("move data without saying so."))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in new issue
Block a user