Hi @mtf
Chiming in here to talk a little about Spyder/Anaconda/pytest/working locally with Exercism et. al.
Not sure what you mean by “old version of Spyder”, but I recommend you upgrade to the most recent version if you can. It has a better console, better error messaging, and better performance.
I am also not sure if “using an old version of Spyder” means that you are using a stand-alone Spyder install, or that you’ve also installed Anaconda, nor what version of Python you are running. If you are using the Anaconda distribution of Python, you will need to upgrade Spyder via the Anaconda Navigator
GUI, or the conda
terminal tool.
For Pytest, you will want to use pip
to install it and some plugins globally via:
python3 -m pip install pytest pytest-cache pytest-subtests
Once that’s sorted, you can install a plug-in to Spyder called spyder-unittest
. It will allow you to run pytest (or nose or unittest) via the Spyder interface. You can find directions here, although for Exercism, you will not be creating a project, but pointing to a downloaded exercise folder.
In order to get downloaded exercises and tests, you will want to install and configure the Exercism CLI on your machine. It may feel like a PITA, but it beats having to copy code and tests from the website or from GitHub.
On my version of Spyder, here is what things look like:
And then you can change which exercise folder to run tests against by using the “hamburger” menu at the top-right of the unittest window to change the folder:
Hope this helps a little. , and let us know if you have any additional questions or issues.