When the plugin is installed, use ``tox`` with the ``--current-env`` or `` --print-deps-only`` and all the other options as usual. Assuming your ``tox`` is installed on Python 3.7:
Running (especially third party software's) tests in your system installed Python environment is dangerous.
Always install ``tox`` and this plugin to some isolated environment,
such as Python virtualenv, Linux container or chroot.
You have been warned.
In order to support the ``python`` command in the ``commands`` section,
the current environment invocation of ``tox`` creates a fake virtual environment
that just have a symbolic link to the Python executable.
This can lead to slightly different results of tests than invoking them directly,
especially if you have assumptions about ``sys.executable`` in your tests.
Any other commands (such as ``pytest``) are not linked anywhere
and it is the users' responsibility to make sure such commands are in ``$PATH`` and use the correct Python.
Regardless of any `Python flags <https://docs.python.org/3/using/cmdline.html>`_ used in the shebang of ``tox``,
the tests are invoked with ``sys.executable`` without any added flags
(unless explicitly invoked with them in the ``commands`` section).
The ``installed:`` line in the output of ``tox --print-deps-only`` shows irrelevant output
(based on the content of the real or faked virtual environment).
Running ``tox --current-env`` after regular ``tox``
(that is without the ``--current-env`` switch)
or vice versa is not supported without the ``--recreate/-r`` flag
(``tox`` will emergency abort in that situation).
Additionally, running ``tox --current-env``,
uninstalling the ``tox-current-env``
and running ``tox`` without the ``--recreate/-r`` flag
will most likely attempt to install packages into your current environment
and will provide further undefined results.
Being uninstalled, ``tox-current-env`` cannot longer prevent this.
The current environment's Python is tested for the major and minor version only.
Possibly multiple different 3.X versions (such as CPython and PyPy) are treated as equal.
Only Linux is supported, with special emphasis on Fedora.
This plugin might work on other Unix-like systems,
but does not work on Microsoft Windows.
This is an alpha quality software.
Use it at your on your own risk.
Development, issues, support
----------------------------
The development happens on GitHub,
at the `fedora-python/tox-current-env <https://github.com/fedora-python/tox-current-env>`_ repository.
You can use the `issue tracker <https://github.com/fedora-python/tox-current-env/issues>`_ there for any discussion
or send Pull Requests.
Tests
~~~~~
In order to run the tests, you'll need ``tox`` and Python 3.6, 3.7 and 3.8 installed.
The integration tests assume all three are available.
On Fedora, you just need to ``dnf install tox``.
Run ``tox`` to invoke the tests.
Running tests of this plugin with this plugin installed and ``--current-env`` flag will most likely blow up.
License
-------
The ``tox-current-env`` project is licensed under so-called MIT license, full text available in the `LICENSE <https://github.com/fedora-python/tox-current-env/blob/master/LICENSE>`_ file.