-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleanup test_listing_fixture and add docs
This commit cleans up some of the cruft from the test_listing_fixture (there is still a bit more in there) that was leftover from testrepository. A bunch of unused parameters were removed as was the per-instance command code which is never used in stestr (since it doesn't support running remote workers). As part of this cleanup API docs were added, including some prose around what it is and how it's constructed. This is one of the more confusing classes so I though it was good to try and explain it's purpose.
- Loading branch information
Showing
3 changed files
with
98 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,3 +35,4 @@ will be noted in the api doc. | |
api/selection | ||
api/scheduler | ||
api/output | ||
api/test_listing_fixture |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
.. _api_test_listing_fixture: | ||
|
||
Test Listing Fixture Module | ||
=========================== | ||
|
||
This module contains the definition of the TestListingFixture fixture class. | ||
This fixture is used for handling the actual spawning of worker processes | ||
for running tests, or listing tests. It is constructed as a `fixture`_ to | ||
handle the lifecycle of the test id list files which are used to pass test ids | ||
to the workers processes running the tests. | ||
|
||
.. _fixture: https://pypi.python.org/pypi/fixtures | ||
|
||
In the normal workflow a TestListingFixture get's returned by the | ||
:ref:`api_config_file`'s get_run_command() function. The config file parses the | ||
config file and the cli options to create a TestListingFixture with the correct | ||
options. This Fixture then gets returned to the CLI commands to enable them to | ||
run the commands. | ||
|
||
The TestListingFixture class is written to be fairly generic in the command | ||
it's executing. This is an artifact of being forked from testrepository where | ||
the test command is defined in the configuration file. In stestr the command is | ||
hard coded ``stestr.config_file`` module so this extra flexibility isn't really | ||
needed. | ||
|
||
API Reference | ||
------------- | ||
|
||
.. automodule:: stestr.test_listing_fixture | ||
:members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters