aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatti Picus <matti.picus@gmail.com>2018-05-09 21:33:41 +0300
committerMatti Picus <matti.picus@gmail.com>2018-05-09 21:33:41 +0300
commit3bcf8fff65e84b492fbeb5affb157ba7d3bf8aab (patch)
treef8599ed14a3dc11391333d1c8f23a512de355a45 /pypy/doc/contributing.rst
parentDocument the purpose of _hash_int() more (diff)
downloadpypy-3bcf8fff65e84b492fbeb5affb157ba7d3bf8aab.tar.gz
pypy-3bcf8fff65e84b492fbeb5affb157ba7d3bf8aab.tar.bz2
pypy-3bcf8fff65e84b492fbeb5affb157ba7d3bf8aab.zip
start to document --runappdirect pytest option
Diffstat (limited to 'pypy/doc/contributing.rst')
-rw-r--r--pypy/doc/contributing.rst18
1 files changed, 18 insertions, 0 deletions
diff --git a/pypy/doc/contributing.rst b/pypy/doc/contributing.rst
index 090f26ef00..cf5977112d 100644
--- a/pypy/doc/contributing.rst
+++ b/pypy/doc/contributing.rst
@@ -325,6 +325,24 @@ interpreter.
.. _py.test usage and invocations: http://pytest.org/latest/usage.html#usage
.. _`build requirements`: build.html#install-build-time-dependencies
+Testing After Translation
+^^^^^^^^^^^^^^^^^^^^^^^^^
+
+While the usual invocation of `pytest` translates a piece of RPython code and
+runs it, we have a test extension to run tests without translation, directly
+on the host python. This is very convenient for modules such as `cpyext`, to
+compare and contrast test results between CPython and PyPy. Untranslated tests
+are invoked by using the `-A` or `--runappdirect` option to `pytest`::
+
+ python2 pytest.py -A pypy/module/cpyext/test
+
+where `python2` can be either `python2` or `pypy2`. On the `py3` branch, the
+collection phase must be run with `python2` so untranslated tests are run
+with::
+
+ cpython2 pytest.py -A pypy/module/cpyext/test --python=path/to/pypy3
+
+
Tooling & Utilities
^^^^^^^^^^^^^^^^^^^