- Improved usage of fixtures
- Replaced fixtures for directly callable factories where
multiple mock objects were needed in the same test function
- Extracted fixtures where possible (in place of literals or
global constants)
- Moved some fixtures to ``conftest.py`` to be used by other
modules
- Made a common base class for both ``TestCommandHandler`` and
``TestPrefixHandler``, extracting common methods, patterns and
signatures
- The extracted patterns in test methods have been named with
leading ``_test``
- Extracted other repeatedly used test utilities into functions
(e.g. ``is_match``) and methods (e.g. ``make_default_handler``)
* raise attribute errors when someone tries to assign values to chat/user_data (closes#1402)
* fix test
* something something not switching entirely and using a messy patch and no not anymore and argh
* Add a prefix to worker thread
This adds a prefix of `Bot:<id>:worker:` to the name of the worker threads.
Fixes#1332
* Also prefix other threads
* Fix test
* Fix test and remove helper method.
* Clarify InlineKeyboardButton callback-data docstring
Fixes#1267
* Improve documentation slightly
- Prettier changelog
- Link to examples on frontpage
- Link to wiki on frontpage
- Put telegram.ext in own sidebar thingy
* Improve ext.Filters documentation
Superseeds #1089
- Remove `:obj:Filter` as it's pretty obvious that it's a filter since it's in this module. It also made the html output about 1/3 times longer to scroll through.
- Add an __all__ to reorder so Filter is at the top instead of BaseFilter
- Add a proper docstring for document that documents the attributes (this is the #1089 part)
- Also fix a couple of grammar errors.
* Fix indentation in telegram.rst
* Add `git describe --long --tags` to the `python -m telegram` output
* Use admonition for examples to make them *pop* better
* Remove automodule telegram
Sphinx was whining a lot and it doesn't actually seem to be needed in any way?
* Fix Filters.document docstring per CR
Co-Authored-By: jsmnbom <jsmnbom@gmail.com>
* Fix spelling error in docs index
Co-Authored-By: jsmnbom <jsmnbom@gmail.com>
* Setting needs_sphinx to 1.7.9
so we don't have more issues with incongruent versions
* Fixed last warnings
* Make pre-commit happy
* Fix unresolvable promises
* added async test and description
* added test_none_on_first_message for conv_handler
* Small change in ConversationHandler docstring
* Fix test to work with new commandhandler
* Add WAITING state and behavior
* Remove `run_async_timeout` and `timed_out_behavior` arguments
* replace with `WAITING` constant and behavior from states
* never wait for promise to resolve (will hang up entire update queue
* see #1250 for discussion
* Fixing pytest version to 4.2.0
Pytest 4.2.1 has a weird bug on top level collect in 4.2.1 Fixing version to 4.2.0
* Make dispatcher use one context per update
It gives user the option to `overload` context with their own properties in a lower group handler if they like
* Improve callbackcontext & run_async docstring
- Add note about how you can add custom attributes to context.
- Add warnings about how run_async and custom attributes should not be used together.
* Small documentation improvements. [ci skip]
* update_filter attribute on filters
Makes it possible to have filters work on an update instead of message, while keeping behavior for current filters
* add update_type filter
* Messagehandler rework
- remove allow_edited (deprecated for a while)
- set deprecated defaults to None
- Raise deprecation warning when they're used
- add sensible defaults for filters.
- rework tests
* Commandhandler rework
* Remove deprecation test from new handler
* Some tweaks per CR
- rename update_types -> updates
- added some clarification to docstrings
* run webhook set test only on 3.6 on appveyor
* update_filter attribute on filters
Makes it possible to have filters work on an update instead of message, while keeping behavior for current filters
* add update_type filter
* Messagehandler rework
- remove allow_edited (deprecated for a while)
- set deprecated defaults to None
- Raise deprecation warning when they're used
- add sensible defaults for filters.
- rework tests
* Commandhandler rework
* Remove deprecation test from new handler
* Some tweaks per CR
- rename update_types -> updates
- added some clarification to docstrings
* run webhook set test only on 3.6 on appveyor
* Changes per CR
* Update travis to build v12
* small doc update
* try to make ci build version branches
* doc for BaseFilter
* Modify regexfilter and mergedfilter
Now returns a list of match objects for every regexfilter
* Change callbackcontext (+ docs)
* integrate in CommandHandler and PrefixHandler
* integrate in MessageHandler
* cbqhandler, iqhandler and srhandler
* make regexhandler a shell over MessageHandler
And raise deprecationWarning on creation
* clean up code and add some comments
* Rework based on internal group feedback
- use data_filter instead of regex_filter on BaseFilter
- have these filters return a dict that is then updated onto CallbackContext instead of using a list is before
- Add a .match property on CallbackContext that returns .matches[0] or None
* Fix and add test for callbackcontext.match
* Lots of documentation fixes and improvements [ci skip]
* Remove message decorator to fix default timeouts.
* Make message wrapper method private.
* Make tests pass
* Fix callbackquery shortcuts
Closes#1180
* Fix callbackquery shortcut tests
* Fix merge
* Address CR
* Add missing default timeout=20 for some bot file uploads
* Fix wrong return value in convhandler
Probably stems from a combination of bad merge plus quickly merged hacktoberfest PR.