| 1 |
|
| 2 |
.. _naming20: |
| 3 |
|
| 4 |
New pytest names in 2.0 (flat is better than nested) |
| 5 |
---------------------------------------------------- |
| 6 |
|
| 7 |
If you used older version of the ``py`` distribution (which |
| 8 |
included the py.test command line tool and Python name space) |
| 9 |
you accessed helpers and possibly collection classes through |
| 10 |
the ``py.test`` Python namespaces. The new ``pytest`` |
| 11 |
Python module flatly provides the same objects, following |
| 12 |
these renaming rules:: |
| 13 |
|
| 14 |
py.test.XYZ -> pytest.XYZ |
| 15 |
py.test.collect.XYZ -> pytest.XYZ |
| 16 |
py.test.cmdline.main -> pytest.main |
| 17 |
|
| 18 |
The old ``py.test.*`` ways to access functionality remain |
| 19 |
valid but you are encouraged to do global renaming according |
| 20 |
to the above rules in your test code. |