Should I introduce a new friendly and efficient way to running and debugging numpy test case?
I'm Qiyu8, Currently, Numpy recommend
a command line method to run test case as demonstrated in Testing Guidelines ,Which
is heavy and inconvenient, It's also a little painful if test cases can not
debug in a visualize way, I happened to find an easier way to running and
debugging numpy test case as below:
Python extension from your extensions:
4.Configuring Tests: Pytest
The VS Code Python
extension supports unit tests as well as pytest. Here's how to
enable the framework:
Palette (ctrl +shift +P) and start typing ‘python: configure tests.’ It
will display a list of available python linters. You can add any of the settings
to your user settings.json file
(opened with the File > Preferences > Settings)
settings.json file like this:
Then you can
running and debugging any test case that you want.
The fallback of
this method is that you have to rebuild numpy before execute testcase if you
changed numpy's source code.