From 6b7791ccf8195247649914a7ce3cbda9bbcdaf06 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Thu, 2 Jul 2026 17:09:42 -0400 Subject: chore(pocketbook)!: remove the in-tree pocketbook package Craig's finish-or-cancel checkpoint resolved to remove: the app left daily use in May and the org-capture popup covers quick notes. The pip install, launcher, and Super+P bind went with it (dotfiles a750cb4); the three pocketbook tasks are closed. --- pocketbook/tests/test_note.py | 69 ------------------------------------------- 1 file changed, 69 deletions(-) delete mode 100644 pocketbook/tests/test_note.py (limited to 'pocketbook/tests/test_note.py') diff --git a/pocketbook/tests/test_note.py b/pocketbook/tests/test_note.py deleted file mode 100644 index 539451a..0000000 --- a/pocketbook/tests/test_note.py +++ /dev/null @@ -1,69 +0,0 @@ -from pocketbook.note import Note - - -class TestNoteSerialisation: - def test_round_trip(self): - note = Note(title="Shopping", body="Milk\nEggs\nBread") - content = note.to_file_content() - restored = Note.from_file_content(content) - assert restored.title == note.title - assert restored.body == note.body - - def test_empty_body(self): - note = Note(title="Empty", body="") - content = note.to_file_content() - restored = Note.from_file_content(content) - assert restored.title == "Empty" - assert restored.body == "" - - def test_empty_title(self): - note = Note(title="", body="some body") - content = note.to_file_content() - restored = Note.from_file_content(content) - assert restored.title == "" - assert restored.body == "some body" - - def test_unicode(self): - note = Note(title="日本語タイトル", body="Ünïcödé bödý 🎉") - content = note.to_file_content() - restored = Note.from_file_content(content) - assert restored.title == "日本語タイトル" - assert restored.body == "Ünïcödé bödý 🎉" - - def test_multiline_body(self): - body = "Line 1\nLine 2\n\nLine 4\n" - note = Note(title="Multi", body=body) - content = note.to_file_content() - restored = Note.from_file_content(content) - assert restored.body == body - - def test_file_content_format(self): - """Title on line 1, blank line, then body.""" - note = Note(title="Title", body="Body text") - content = note.to_file_content() - assert content == "Title\n\nBody text" - - def test_from_file_content_no_blank_line(self): - """Gracefully handle files without a blank separator.""" - restored = Note.from_file_content("JustTitle") - assert restored.title == "JustTitle" - assert restored.body == "" - - -class TestNoteFilename: - def test_generate_filename(self): - note = Note(title="Test", body="") - filename = note.generate_filename(order=1) - assert filename.startswith("0001-") - assert filename.endswith(".txt") - # Format: 0001-YYYYMMDD-HHMMSS-shortid.txt - parts = filename.split("-") - assert len(parts) == 4 - assert len(parts[0]) == 4 # order - assert len(parts[1]) == 8 # date - # parts[2] = HHMMSS + shortid.txt combined via split on - - # Actually: 0001-20260225-143012-abc12.txt has 4 parts - - def test_parse_order_from_filename(self): - assert Note.parse_order("0005-20260101-120000-abc12.txt") == 5 - assert Note.parse_order("0001-20260101-120000-xyz99.txt") == 1 -- cgit v1.2.3