Skip to content

Commit

Permalink
rework pytest MockIRCServer kwarg section
Browse files Browse the repository at this point in the history
  • Loading branch information
dgw committed Apr 22, 2024
1 parent 9d1955c commit 4e08196
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions _upgrading/sopel-8.md
Original file line number Diff line number Diff line change
Expand Up @@ -395,13 +395,17 @@ raise a `KeyError`.

### Testing tool changes

* Convenience methods of the mock IRC server available through Sopel's `pytest`
plugin implement keyword-only arguments now. This applies to:
* `MockIRCServer.channel_joined()`
* `MockIRCServer.mode_set()`
* `MockIRCServer.join()`
* `MockIRCServer.say()`
* `MockIRCServer.pm()`
The `MockIRCServer` mock object from Sopel's `pytest` plugin implements
`blocking` as a keyword-only argument in Sopel 8. This applies to:

* `MockIRCServer.channel_joined()`
* `MockIRCServer.join()`
* `MockIRCServer.mode_set()`
* `MockIRCServer.pm()`
* `MockIRCServer.say()`

To upgrade test cases using this mock, simply add `blocking=` to this parameter
of the method call if it's missing.

### Moved API features

Expand Down

0 comments on commit 4e08196

Please sign in to comment.