Ronny Pfannschmidt avatar Ronny Pfannschmidt committed 8eb13a6


Comments (0)

Files changed (1)


 # HG changeset patch
-# Parent 8823c1dbe121daea50dccf6b41e46e75d0dce8b0
+# Parent 3da8cec6c5326ed27c144c9b6d7a64a648370005
+introduce items kwarg for parametrize  which provides (ids, argvalues) = zip(items)
 diff --git a/_pytest/ b/_pytest/
 --- a/_pytest/
 +++ b/_pytest/
-@@ -605,7 +605,7 @@ class Metafunc:
+@@ -589,7 +589,7 @@ class Metafunc:
          self._calls = []
          self._ids = py.builtin.set()
          """ Add new invocations to the underlying test function using the list
          of argvalues for the given argnames.  Parametrization is performed
          during the collection phase.  If you need to setup expensive resources
-@@ -625,7 +625,15 @@ class Metafunc:
+@@ -609,7 +609,15 @@ class Metafunc:
          :arg ids: list of string ids each corresponding to the argvalues so
              that they are part of the test id. If no ids are provided they will
              be generated automatically from the argvalues.
 diff --git a/testing/ b/testing/
 --- a/testing/
 +++ b/testing/
-@@ -1066,6 +1066,15 @@ class TestMetafunc:
-             "*6 fail*",
-         ])
+@@ -1048,6 +1048,15 @@ class TestMetafunc:
+         assert metafunc._calls[1].funcargs == dict(x=3, y=4)
+         assert metafunc._calls[1].id == "3-4"
 +    def test_parametrize_items(self):
 +        metafunc = funcargs.Metafunc(lambda x,y: None)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.