From d19363dc56f394ae05be49312ac5dc454cb869d9 Mon Sep 17 00:00:00 2001 From: hannah Date: Wed, 14 Apr 2021 20:42:08 -0400 Subject: [PATCH 1/3] Dev install troubleshooting Don't really know where to put this, but I just spent like half an hour and a lot of install/uninstall/banging my head against a wall trying to figure out why pytest and numpy were conflicting in weird ways until I remembered that in conda you have to usually explicitly install pytest. Figure there are a couple of other really common things that mostly don't go out of date that might be worth including. --- doc/devel/development_setup.rst | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/doc/devel/development_setup.rst b/doc/devel/development_setup.rst index d926f401c757..db99362b64de 100644 --- a/doc/devel/development_setup.rst +++ b/doc/devel/development_setup.rst @@ -26,7 +26,7 @@ and activated with one of the following:: \Scripts\Activate.ps1 # Windows PowerShell Whenever you plan to work on Matplotlib, remember to activate the development -environment in your shell. +environment in your shell. Retrieving the latest version of the code ========================================= @@ -65,7 +65,7 @@ also happen if you change branches) you will have to re-run Additional dependencies for testing =================================== This section lists the additional software required for -:ref:`running the tests `. +:ref:`running the tests `. Required: @@ -133,3 +133,11 @@ Optional, but recommended: built without Inkscape and optipng, but the build process will raise various warnings. If the build process warns that you are missing fonts, make sure your LaTeX distribution bundles cm-super or install it separately. + + .. _troubleshooting: + + Troubleshooting + =============== + * pytest - If the test runner is failing, verify that the pytest you are using + is installed in your environment using the ``which pytest`` and ``which python`` + commands. If the paths are not the same, install pytest in your environment. From c3a7acc7b3fa868ff4bf38bc3ffef4ab3d408d2a Mon Sep 17 00:00:00 2001 From: hannah Date: Wed, 14 Apr 2021 20:47:53 -0400 Subject: [PATCH 2/3] 80 word wrap + testing --- doc/devel/development_setup.rst | 18 ++++++++---------- doc/devel/testing.rst | 2 +- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/doc/devel/development_setup.rst b/doc/devel/development_setup.rst index db99362b64de..afb0927e17f1 100644 --- a/doc/devel/development_setup.rst +++ b/doc/devel/development_setup.rst @@ -26,7 +26,7 @@ and activated with one of the following:: \Scripts\Activate.ps1 # Windows PowerShell Whenever you plan to work on Matplotlib, remember to activate the development -environment in your shell. +environment in your shell. Retrieving the latest version of the code ========================================= @@ -65,7 +65,7 @@ also happen if you change branches) you will have to re-run Additional dependencies for testing =================================== This section lists the additional software required for -:ref:`running the tests `. +:ref:`running the tests `. Required: @@ -133,11 +133,9 @@ Optional, but recommended: built without Inkscape and optipng, but the build process will raise various warnings. If the build process warns that you are missing fonts, make sure your LaTeX distribution bundles cm-super or install it separately. - - .. _troubleshooting: - - Troubleshooting - =============== - * pytest - If the test runner is failing, verify that the pytest you are using - is installed in your environment using the ``which pytest`` and ``which python`` - commands. If the paths are not the same, install pytest in your environment. + +Troubleshooting +=============== +* pytest - If the test runner is failing, verify that the pytest you are using +is installed in your environment using the ``which pytest`` and ``which python`` +commands. If the paths are not the same, install pytest in your environment. diff --git a/doc/devel/testing.rst b/doc/devel/testing.rst index 49c27002b058..1113e431f4cd 100644 --- a/doc/devel/testing.rst +++ b/doc/devel/testing.rst @@ -37,7 +37,7 @@ Running the tests In the root directory of your development repository run:: - pytest + python -m pytest pytest can be configured via a lot of `command-line parameters`_. Some From 6c46b59a21cbf60b80295f45f0f3a416f2f27de3 Mon Sep 17 00:00:00 2001 From: hannah Date: Sun, 18 Apr 2021 16:35:34 -0400 Subject: [PATCH 3/3] removed troubleshooting section, add -m to testing --- doc/devel/development_setup.rst | 8 +------- doc/devel/testing.rst | 4 ++-- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/doc/devel/development_setup.rst b/doc/devel/development_setup.rst index afb0927e17f1..a511e4a6aef3 100644 --- a/doc/devel/development_setup.rst +++ b/doc/devel/development_setup.rst @@ -132,10 +132,4 @@ Optional, but recommended: Python packages and must be installed separately. The documentation can be built without Inkscape and optipng, but the build process will raise various warnings. If the build process warns that you are missing fonts, make sure - your LaTeX distribution bundles cm-super or install it separately. - -Troubleshooting -=============== -* pytest - If the test runner is failing, verify that the pytest you are using -is installed in your environment using the ``which pytest`` and ``which python`` -commands. If the paths are not the same, install pytest in your environment. + your LaTeX distribution bundles cm-super or install it separately. \ No newline at end of file diff --git a/doc/devel/testing.rst b/doc/devel/testing.rst index 1113e431f4cd..b46586104121 100644 --- a/doc/devel/testing.rst +++ b/doc/devel/testing.rst @@ -258,10 +258,10 @@ Run the tests ^^^^^^^^^^^^^ To run the all the tests on your installed version of Matplotlib:: - pytest --pyargs matplotlib.tests + python -m pytest --pyargs matplotlib.tests The test discovery scope can be narrowed to single test modules or even single functions:: - pytest --pyargs matplotlib.tests.test_simplification.py::test_clipping + python -m pytest --pyargs matplotlib.tests.test_simplification.py::test_clipping