You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running tests with tox is much more powerful, but requires a bit more setup.
273
273
274
-
You'll need to export an environment variable for *each* tox environment you wish to test with. For example, if you want to test with `Python 2.7` and
274
+
You'll need to export an environment variable for *each* tox environment you wish to test with. For example, if you want to test with `Python 3.9` and
275
275
`Python 3.6`, but only care to check the `core` specs, you would need to ensure that the following variables are exported:
276
276
277
277
```
278
-
export PLOTLY_TOX_PYTHON_27=<python binary>
278
+
export PLOTLY_TOX_PYTHON_39=<python binary>
279
279
export PLOTLY_TOX_PYTHON_36=<python binary>
280
280
```
281
281
@@ -286,15 +286,15 @@ Where the `<python binary` is going to be specific to your development setup. As
286
286
# tox envs #
287
287
############
288
288
289
-
exportPLOTLY_TOX_PYTHON_27=python2.7
290
-
exportPLOTLY_TOX_PYTHON_34=python3.4
291
-
export TOXENV=py27-core,py34-core
289
+
exportPLOTLY_TOX_PYTHON_39=python3.9
290
+
exportPLOTLY_TOX_PYTHON_36=python3.6
291
+
export TOXENV=py39-core,py36-core
292
292
```
293
293
294
294
Where `TOXENV` is the environment list you want to use when invoking `tox` from the command line. Note that the `PLOTLY_TOX_*` pattern is used to pass in variables for use in the `tox.ini` file. Though this is a little setup, intensive, you'll get the following benefits:
295
295
296
296
*`tox` will automatically manage a virtual env for each environment you want to test in.
297
-
* You only have to run `tox` and know that the module is working in both `Python 2` and `Python 3`.
297
+
* You only have to run `tox` and know that the module is working in all included Python versions.
298
298
299
299
Finally, `tox` allows you to pass in additional command line arguments that are formatted in (by us) in the `tox.ini` file, see `{posargs}`. This is setup to help with our configuration of [pytest markers](http://doc.pytest.org/en/latest/example/markers.html), which are set up in `packages/python/plotly/pytest.ini`. To run only tests that are *not* tagged with `nodev`, you could use the following command:
0 commit comments