Skip to content

Add test coverage for IRC bot components - #9

Merged
nanonyme merged 3 commits into
mainfrom
copilot/test-bot-irc-components
Feb 19, 2026
Merged

nanonyme merged 3 commits into
mainfrom
copilot/test-bot-irc-components

Conversation

Copilot AI commented Feb 19, 2026 •

Copy link
Copy Markdown
Contributor

CI only tested app.py (message handling, URL parsing). The IRC layer in nanobot.py had zero test coverage.

Changes

Added tests/test_bot.py with 21 tests covering:

  • RemoteProtocol - RPC proxy for bot-to-IRC commands (msg, join, leave)
  • NanoBotProtocol - IRC client (channel auto-join, privmsg routing, public vs private message distinction)
  • ServerConnection - Connection factory (hostname, port, SSL, channel config)
  • ApiProxy - Message queue between bot and app processes (registration, queueing, disconnection)
  • NanoBot - Main class (config loading, nickname/realname properties, error handling)

Tests use Twisted Trial with mock objects to isolate components without actual IRC connections. Total test count: 33 → 54.

Original prompt

This section details on the original issue you should resolve

<issue_title>Figure out how to test the entire bot, not just app in CI</issue_title>
<issue_description>Bot contains the IRC parts and that should be tested too.</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits February 19, 2026 10:40
Co-authored-by: nanonyme <348449+nanonyme@users.noreply.github.com>
Co-authored-by: nanonyme <348449+nanonyme@users.noreply.github.com>
Copilot AI changed the title [WIP] Add CI testing for entire bot including IRC parts Add test coverage for IRC bot components Feb 19, 2026
Copilot AI requested a review from nanonyme February 19, 2026 10:43
@nanonyme
nanonyme marked this pull request as ready for review February 19, 2026 10:46
@nanonyme
nanonyme merged commit e3a7aa5 into main Feb 19, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Figure out how to test the entire bot, not just app in CI

2 participants