Skip to content

Commit

Permalink
docs: add more info to test tools (old and new) [Skip CI]
Browse files Browse the repository at this point in the history
`versionadded` annotation for new stuff in `sopel.tests` namespace.

Note in `sopel.test_tools` docstring that the (unlisted) mock classes
within are deprecated, and link to the new tools.
  • Loading branch information
dgw committed Apr 5, 2020
1 parent 254b80a commit b352fd1
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 5 deletions.
11 changes: 10 additions & 1 deletion sopel/test_tools.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# coding=utf-8
"""This module has classes and functions that can help in writing tests."""
"""This module has classes and functions that can help in writing tests.
.. note::
This module formerly contained mock classes for bot, bot wrapper, and config
objects. Those are deprecated, and will be removed in Sopel 8.0. New code
should use the new :mod:`.mocks`, :mod:`.factories`, and
:mod:`.pytest_plugin` added in Sopel 7.0.
"""
# Copyright 2013, Ari Koivula, <ari@koivu.la>
# Copyright 2019, Florian Strzelecki <florian.strzelecki@gmail.com>
# Licensed under the Eiffel Forum License 2.
Expand Down
5 changes: 4 additions & 1 deletion sopel/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# coding=utf-8
"""Tests tools, factories, pytest fixtures, and mocks."""
"""Test tools, factories, pytest fixtures, and mocks.
.. versionadded:: 7.0
"""
from __future__ import unicode_literals, absolute_import, print_function, division


Expand Down
5 changes: 4 additions & 1 deletion sopel/tests/factories.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# coding=utf-8
"""Test factories: they create objects for testing purposes."""
"""Test factories: they create objects for testing purposes.
.. versionadded:: 7.0
"""
from __future__ import unicode_literals, absolute_import, print_function, division

import re
Expand Down
5 changes: 4 additions & 1 deletion sopel/tests/mocks.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# coding=utf-8
"""Test mocks: they fake objects for testing."""
"""Test mocks: they fake objects for testing.
.. versionadded:: 7.0
"""
from __future__ import unicode_literals, absolute_import, print_function, division


Expand Down
5 changes: 4 additions & 1 deletion sopel/tests/pytest_plugin.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# coding=utf-8
"""Pytest plugin for Sopel."""
"""Pytest plugin for Sopel.
.. versionadded:: 7.0
"""
from __future__ import unicode_literals, absolute_import, print_function, division

import pytest
Expand Down

0 comments on commit b352fd1

Please sign in to comment.