From edaae847434405148310d5c7829289f772596f97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carles=20Barrob=C3=A9s?= Date: Sun, 9 Feb 2014 00:28:40 +0100 Subject: [PATCH] Document use of --- docs/example.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/example.rst b/docs/example.rst index 00bd4d8..f8b503d 100644 --- a/docs/example.rst +++ b/docs/example.rst @@ -7,6 +7,13 @@ and two method decorators (for your tests that want to be multiplied): * ``data``: contains as many arguments as values you want to feed to the test. * ``file_data``: will load test data from a JSON file. +Normally each value within ``data`` will be passed as a single argument to +your test method. If these values are e.g. tuples, you will have to unpack them +inside your test. Alternatively, you can use an additional decorator, +``unpack``, that will automatically unpack tuples and lists into multiple +arguments, and dictionaries into multiple keyword arguments. See examples +below. + This allows you to write your tests as: .. literalinclude:: ../test/test_example.py