Allow test_loader_name to override test class module #171
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When running gabbi by default the pretty name of the test
(displayed in test results) has a 'gabbi.suitemaker' prefix. This
can be disorienting when reviewing result sets or trying to track
those results to where in a code tree the gabbi tests are loaded.
This change allows the module of the test classes that are
dynamically created to be override with the test_loader_name
that is passed in to to the build_tests method. By setting this
to name the test is appropriately situated in its context. The
gist of this change can be seen on the diff to test-limit.sh.
Note that this has also been tested in OpenStack Nova, which
was the source of this need. There tests which were showing up with
the name:
have become:
By default nothing has changed. This change only impact situations where
test_loader_name is used.
/cc @FND @jasonamyers @sdague