This commit was originally from @fredfishgames, but it
needed a big rebase due to use letting it sit too long.
Also, we decided not to have shebangs at the top of test
files.
This adds mypy annotations, and we also make the type
conversions in `handle_message` be a little more clear.
(@showell helped clean up this commit a bit)
Chess Bot is a bot that allows you to play chess against either another
user or the computer. Use `start with other user` or
`start as <color> with computer` to start a game.
In order to play against a computer, `chess.conf` must be set with the
key `stockfish_location` set to the location of the Stockfish program on
this computer.
Use `bot_handler.storage` to preserve game state across messages.
(@showell also did minor work here to have the test use verify_dialog()
and have the bot respond to empty messages)
Since we have dropped Python 2 support for the bots and botserver
packages, we now have 'invalid' syntax if we run coverage
for all packages in a Python 2 environment.
This program replaces zulip_bot_output.py, which had
gotten a little out of date.
It should be able to simulate a terminal conversation for
all of our bots, including those that use "advanced" features:
third party config files: tested with giphy
message updates: tested with incrementor
storage: tested with virtual_fs and others
Before this patch, we were reading in old coverage data every
time we ran test-main and had a .coverage file lying around.
This would cause inaccurate data when you changed code, and it
would cause crashes if you moved your working directory on the
file system.
unittest includes by default all module-level classes that inherit
from TestCase and implement at least one method starting with 'test'.
Since it doesn't provide a convenient way for excluding TestSuites,
we need to manually filter out the unwanted testing of our test base
class itself.