diff options
author | Tim Simpson <tim.simpson@rackspace.com> | 2014-11-17 13:51:24 -0600 |
---|---|---|
committer | Tim Simpson <tim.simpson@rackspace.com> | 2014-11-17 13:51:24 -0600 |
commit | 52fc67e51ebcc10404e43205c48080e594886898 (patch) | |
tree | dd2fca0f45e1081b24d2cb0901b321635385f1ab /generate_examples.py | |
parent | fc80208a46323669dc7d7541c8c6100f1bb8f739 (diff) | |
download | trove-52fc67e51ebcc10404e43205c48080e594886898.tar.gz |
Create example generator
This code adds a feature to the tests where all of the example
snippets are generated and then validated. Tests fail if the new
examples don't match the old ones, meaning a dev changing the API
must update the snippets, triggering a conversation about the changes
during the pull request.
Implements: blueprint example-snippet-generator
Change-Id: I5f1bfd47558a646a56e519614ae76a55759a4422
Diffstat (limited to 'generate_examples.py')
-rw-r--r-- | generate_examples.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/generate_examples.py b/generate_examples.py new file mode 100644 index 00000000..ff9bcd08 --- /dev/null +++ b/generate_examples.py @@ -0,0 +1,10 @@ +import run_tests + + +def import_tests(): + from trove.tests.examples import snippets + snippets.monkey_patch_uuid_and_date() + + +if __name__ == "__main__": + run_tests.main(import_tests) |