6cdb83ce72
Previously the test-bots script filtered out base-class tests from BotTestCase. With this change, BotTestCase continues to inherit from unittest.TestCase, but the default test_* methods previously in this class are now in a new DefaultTests class, which does not. Instead, each bot needs to inherit from BotTestCase and DefaultTests *explicitly*. This avoids the need to filter out the base-class tests, which simplifies the test-bots script, and may ease any migration to eg. pytest. The DefaultTests class does require some non-implemented methods which BotTestCase provides. |
||
---|---|---|
.. | ||
zulip_bots | ||
architecture.md | ||
README.md | ||
setup.py |
Zulip bots
This directory contains the source code for the zulip_bots
PyPI package.
The Zulip documentation has guides on using Zulip's bot system and writing your own bots.
Directory structure
zulip_bots # This directory
├───zulip_bots # `zulip_bots` package.
│ ├───bots/ # Actively maintained and tested bots.
│ ├───bots_unmaintained/ # Unmaintained, potentially broken bots.
│ ├───game_handler.py # Handles game-related bots.
│ ├───lib.py # Backbone of run.py
│ ├───provision.py # Creates a development environment.
│ ├───run.py # Used to run bots.
│ ├───simple_lib.py # Used for terminal testing.
│ ├───test_lib.py # Backbone for bot unit tests.
│ ├───test_run.py # Unit tests for run.py
│ └───terminal.py # Used to test bots in the command line.
└───setup.py # Script for packaging.