Skip to content

Commit 26c129d

Browse files
committed
Remove decorative separator comments from test files, add style rule
1 parent 1a6e2e8 commit 26c129d

3 files changed

Lines changed: 1 addition & 80 deletions

File tree

GUIDANCE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Rules and corrections for writing code in this project.
88
- Never import inside functions. All imports must be at the top of the file.
99
- Never use `# noqa: F401` — if something is imported, it must be used.
1010
- Maximum line length is 120 characters.
11+
- No decorative/separator comments (e.g. `# -----------` section banners). Code structure should be self-evident. Only add comments that explain *why*, never *what*.
1112

1213
## Tooling
1314

tests/integration/test_talk.py

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@
1717
pytestmark = pytest.mark.integration
1818

1919

20-
# ---------------------------------------------------------------------------
21-
# Helpers
22-
# ---------------------------------------------------------------------------
23-
24-
2520
async def _create_room(nc_mcp: McpTestHelper, name: str, room_type: int = 2) -> dict[str, Any]:
2621
"""Create a conversation and return the parsed result."""
2722
result = await nc_mcp.call("create_conversation", room_type=room_type, name=name)
@@ -51,11 +46,6 @@ def _extract_message_id(line: str) -> int:
5146
return int(match.group(1))
5247

5348

54-
# ---------------------------------------------------------------------------
55-
# list_conversations
56-
# ---------------------------------------------------------------------------
57-
58-
5949
class TestListConversations:
6050
@pytest.mark.asyncio
6151
async def test_returns_json_list(self, nc_mcp: McpTestHelper) -> None:
@@ -103,11 +93,6 @@ async def test_conversation_type_labels(self, nc_mcp: McpTestHelper) -> None:
10393
await _delete_room(nc_mcp, str(public_room["token"]))
10494

10595

106-
# ---------------------------------------------------------------------------
107-
# get_conversation
108-
# ---------------------------------------------------------------------------
109-
110-
11196
class TestGetConversation:
11297
@pytest.mark.asyncio
11398
async def test_returns_conversation_details(self, nc_mcp: McpTestHelper) -> None:
@@ -136,11 +121,6 @@ async def test_returns_read_only_status(self, nc_mcp: McpTestHelper) -> None:
136121
await _delete_room(nc_mcp, str(room["token"]))
137122

138123

139-
# ---------------------------------------------------------------------------
140-
# get_messages (compact format)
141-
# ---------------------------------------------------------------------------
142-
143-
144124
class TestGetMessages:
145125
@pytest.mark.asyncio
146126
async def test_returns_compact_format(self, nc_mcp: McpTestHelper) -> None:
@@ -283,11 +263,6 @@ async def test_compact_format_saves_space(self, nc_mcp: McpTestHelper) -> None:
283263
await _delete_room(nc_mcp, str(room["token"]))
284264

285265

286-
# ---------------------------------------------------------------------------
287-
# get_participants
288-
# ---------------------------------------------------------------------------
289-
290-
291266
class TestGetParticipants:
292267
@pytest.mark.asyncio
293268
async def test_returns_participants_list(self, nc_mcp: McpTestHelper) -> None:
@@ -330,11 +305,6 @@ async def test_nonexistent_conversation_raises(self, nc_mcp: McpTestHelper) -> N
330305
await nc_mcp.call("get_participants", token="nonexistent-xyz-12345")
331306

332307

333-
# ---------------------------------------------------------------------------
334-
# send_message
335-
# ---------------------------------------------------------------------------
336-
337-
338308
class TestSendMessage:
339309
@pytest.mark.asyncio
340310
async def test_send_basic_message(self, nc_mcp: McpTestHelper) -> None:
@@ -413,11 +383,6 @@ async def test_sent_message_appears_in_get_messages(self, nc_mcp: McpTestHelper)
413383
await _delete_room(nc_mcp, str(room["token"]))
414384

415385

416-
# ---------------------------------------------------------------------------
417-
# create_conversation
418-
# ---------------------------------------------------------------------------
419-
420-
421386
class TestCreateConversation:
422387
@pytest.mark.asyncio
423388
async def test_create_group_conversation(self, nc_mcp: McpTestHelper) -> None:
@@ -479,11 +444,6 @@ async def test_creator_is_participant(self, nc_mcp: McpTestHelper) -> None:
479444
await _delete_room(nc_mcp, str(data["token"]))
480445

481446

482-
# ---------------------------------------------------------------------------
483-
# delete_message
484-
# ---------------------------------------------------------------------------
485-
486-
487447
class TestDeleteMessage:
488448
@pytest.mark.asyncio
489449
async def test_delete_own_message(self, nc_mcp: McpTestHelper) -> None:
@@ -522,11 +482,6 @@ async def test_delete_in_nonexistent_conversation_raises(self, nc_mcp: McpTestHe
522482
await nc_mcp.call("delete_message", token="nonexistent-xyz-12345", message_id=1)
523483

524484

525-
# ---------------------------------------------------------------------------
526-
# leave_conversation
527-
# ---------------------------------------------------------------------------
528-
529-
530485
class TestLeaveConversation:
531486
@pytest.mark.asyncio
532487
async def test_leave_group_conversation(self, nc_mcp: McpTestHelper) -> None:
@@ -557,11 +512,6 @@ async def test_leave_nonexistent_conversation_raises(self, nc_mcp: McpTestHelper
557512
await nc_mcp.call("leave_conversation", token="nonexistent-xyz-12345")
558513

559514

560-
# ---------------------------------------------------------------------------
561-
# Permission enforcement
562-
# ---------------------------------------------------------------------------
563-
564-
565515
class TestTalkPermissions:
566516
@pytest.mark.asyncio
567517
async def test_read_only_allows_list_conversations(self, nc_mcp_read_only: McpTestHelper) -> None:

tests/integration/test_talk_polls.py

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@
1111
pytestmark = pytest.mark.integration
1212

1313

14-
# ---------------------------------------------------------------------------
15-
# Helpers
16-
# ---------------------------------------------------------------------------
17-
18-
1914
async def _create_room(nc_mcp: McpTestHelper, name: str, room_type: int = 2) -> dict[str, Any]:
2015
"""Create a conversation and return the parsed result."""
2116
result = await nc_mcp.call("create_conversation", room_type=room_type, name=name)
@@ -49,11 +44,6 @@ async def _create_test_poll(
4944
return json.loads(result)
5045

5146

52-
# ---------------------------------------------------------------------------
53-
# create_poll
54-
# ---------------------------------------------------------------------------
55-
56-
5747
class TestCreatePoll:
5848
@pytest.mark.asyncio
5949
async def test_create_basic_poll(self, nc_mcp: McpTestHelper) -> None:
@@ -149,11 +139,6 @@ async def test_create_poll_initial_state(self, nc_mcp: McpTestHelper) -> None:
149139
await _delete_room(nc_mcp, str(room["token"]))
150140

151141

152-
# ---------------------------------------------------------------------------
153-
# get_poll
154-
# ---------------------------------------------------------------------------
155-
156-
157142
class TestGetPoll:
158143
@pytest.mark.asyncio
159144
async def test_get_poll_returns_details(self, nc_mcp: McpTestHelper) -> None:
@@ -220,11 +205,6 @@ async def test_get_poll_reflects_votes(self, nc_mcp: McpTestHelper) -> None:
220205
await _delete_room(nc_mcp, str(room["token"]))
221206

222207

223-
# ---------------------------------------------------------------------------
224-
# vote_poll
225-
# ---------------------------------------------------------------------------
226-
227-
228208
class TestVotePoll:
229209
@pytest.mark.asyncio
230210
async def test_vote_single_option(self, nc_mcp: McpTestHelper) -> None:
@@ -317,11 +297,6 @@ async def test_vote_on_closed_poll_raises(self, nc_mcp: McpTestHelper) -> None:
317297
await _delete_room(nc_mcp, str(room["token"]))
318298

319299

320-
# ---------------------------------------------------------------------------
321-
# close_poll
322-
# ---------------------------------------------------------------------------
323-
324-
325300
class TestClosePoll:
326301
@pytest.mark.asyncio
327302
async def test_close_poll(self, nc_mcp: McpTestHelper) -> None:
@@ -388,11 +363,6 @@ async def test_close_poll_preserves_question_and_options(self, nc_mcp: McpTestHe
388363
await _delete_room(nc_mcp, str(room["token"]))
389364

390365

391-
# ---------------------------------------------------------------------------
392-
# Permission enforcement
393-
# ---------------------------------------------------------------------------
394-
395-
396366
class TestPollPermissions:
397367
@pytest.mark.asyncio
398368
async def test_read_only_allows_get_poll(self, nc_mcp_read_only: McpTestHelper) -> None:

0 commit comments

Comments
 (0)