Skip to content

Commit

Permalink
Document package level export
Browse files Browse the repository at this point in the history
  • Loading branch information
timofurrer committed Oct 25, 2019
1 parent d98526c commit 1d0e407
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
45 changes: 45 additions & 0 deletions docs/source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,51 @@ API
This part of the documentation lists the full API reference of all public
classes and functions.

Package Top-Level Exports
-------------------------

The following packages can be imported from the radish package:

.. testcode::

from radish import (
# Step Decorators
given,
when,
then,
step,

# Hooks & Terrain
world,
before,
after,

# Step Pattern Types
custom_type,

# The radish parser
FeatureFileParser,

# Models
Feature,
Rule,
DefaultRule,
Background,
Scenario,
ScenarioOutline,
ScenarioLoop,
Step,
Tag,
PreconditionTag,
ConstantTag,

# Exception Types
RadishError,

# The radish-bdd package version
__version__
)

Decorators
----------

Expand Down
14 changes: 14 additions & 0 deletions src/radish/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,20 @@
# Expose useful objects on radish package level
from radish.errors import RadishError # noqa
from radish.hookregistry import after, before # noqa
from radish.models import ( # noqa
Background,
ConstantTag,
DefaultRule,
Feature,
PreconditionTag,
Rule,
Scenario,
ScenarioLoop,
ScenarioOutline,
Step,
Tag
)
from radish.parser import FeatureFileParser # noqa
from radish.parsetyperegistry import custom_type # noqa
from radish.stepregistry import given, step, then, when # noqa
from radish.terrain import world # noqa

0 comments on commit 1d0e407

Please sign in to comment.