This repository was archived by the owner on Mar 22, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Print help string on help command (#16)
* Add unit test framework and integration test description * Add docker-compose file and integration test infrastructure * Remove debug print from message handler * Add linting and testing workflows * Add linter config * Fix flake errors * Add docformatter dependency * Fix isort * Fix integration test script * Finish unit tests in bot_test.py (#11) * Message handler unit tests (#12) * Finish unit tests in bot_test.py * WIP * Remove debug prints * Finish unit tests (#13) * Add integration tests (#14) * Make integration tests multiprocess * Add the first integration tests * Add uncommitted files' * Simplify code to expect reply * Fix weird merge errors * Fix unit test * Add file and reaction test * Minor adjustments * Finish tests, add one retry to expect_reply * Increase docker startup wait * Try de-flaking sleep test * Add random delay before each test to prevent overloading * Remove random delay, explicitly sort thread order * Add help string function, support multiple listeners Finishes `Plugin.get_help_string` and supports registering multiple listeners on the same function. * Add docstrings to ExamplePlugin functions * Update snapshot with docstrings * prevent global mock * Crank up integration test response timeout * Try changing reply_start from async to sync * Give the bot 5 seconds to start up * Wait 5 seconds between starting bot and sending messages * Use new docker image with different tokens
- Loading branch information
Showing
7 changed files
with
140 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
**/*.egg-info | ||
**/*.log | ||
**/*.lock | ||
test.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ isort==5.7.0 | |
pytest==6.2.2 | ||
pytest-xdist==2.2.1 | ||
pytype==2021.1.28 | ||
snapshottest==0.6.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# -*- coding: utf-8 -*- | ||
# snapshottest: v1 - https://goo.gl/zC4yUc | ||
from __future__ import unicode_literals | ||
|
||
from snapshottest import Snapshot | ||
|
||
|
||
snapshots = Snapshot() | ||
|
||
snapshots['TestPlugin.test_help_string 1'] = '''Plugin FakePlugin has the following functions: | ||
---- | ||
- `direct_pattern`: | ||
No description provided. | ||
Additional information: | ||
- Needs to be a direct message. | ||
- Restricted to certain users. | ||
---- | ||
- `^help$`: | ||
Prints the list of functions registered on every active plugin. | ||
Additional information: | ||
- Needs to either mention @ or be a direct message. | ||
---- | ||
- `^!help$`: | ||
Prints the list of functions registered on every active plugin. | ||
---- | ||
- `async_pattern`: | ||
Async function docstring. | ||
---- | ||
- `another_async_pattern`: | ||
Async function docstring. | ||
Additional information: | ||
- Needs to be a direct message. | ||
---- | ||
- `pattern`: | ||
This is the docstring of my_function. | ||
---- | ||
''' |