Skip to content

Commit

Permalink
Updated the testing documentation to recommend using start_component()
Browse files Browse the repository at this point in the history
  • Loading branch information
agronholm committed May 4, 2024
1 parent 133d643 commit a563468
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions docs/userguide/testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ Testing Asphalt components
Testing Asphalt components and component hierarchies is a relatively simple procedure:

#. Create an instance of your :class:`~Component`
#. Create a :class:`~Context` instance
#. Run the component's :meth:`~Component.start` method with the context as the argument
#. Run the tests
#. Close the context to release any resources
#. Create a :class:`~Context` and enter it with ``async with ...``
#. Run :func:`start_component` with the component instance as the argument
#. Run the test code itself

With Asphalt projects, it is recommended to use the pytest_ testing framework because it
is already being used with Asphalt core and it provides easy testing of asynchronous
Expand Down

0 comments on commit a563468

Please sign in to comment.