File: naming20.rst

package info (click to toggle)
pytest 8.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 7,992 kB
  • sloc: python: 62,771; makefile: 45
file content (20 lines) | stat: -rw-r--r-- 719 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

.. _naming20:

New pytest names in 2.0 (flat is better than nested)
----------------------------------------------------

If you used older version of the ``py`` distribution (which
included the py.test command line tool and Python name space)
you accessed helpers and possibly collection classes through
the ``py.test`` Python namespaces.  The new ``pytest``
Python module flatly provides the same objects, following
these renaming rules::

    py.test.XYZ          -> pytest.XYZ
    py.test.collect.XYZ  -> pytest.XYZ
    py.test.cmdline.main -> pytest.main

The old ``py.test.*`` ways to access functionality remain
valid but you are encouraged to do global renaming according
to the above rules in your test code.