From 52fc67e51ebcc10404e43205c48080e594886898 Mon Sep 17 00:00:00 2001 From: Tim Simpson Date: Mon, 17 Nov 2014 13:51:24 -0600 Subject: 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 --- generate_examples.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 generate_examples.py (limited to 'generate_examples.py') 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) -- cgit v1.2.1