How to test properly?

Hi,
I’m pretty new to making code contributions on this project and am a bit at a loss as to how to test my PRs properly. I’ve read the contributer guide and run python test/run_test.py, but am having the following issues:

  1. A number of tests fail locally, even when I checkout the strict/viable branch and apply no changes.
  2. Running all of the tests takes hours (I killed the test script after the 3h mark).

Given that, if I make some changes, how do I know which (if any) tests will break as a result? Is there some nice way to get a quick test diff?

Hey!

I’m afraid there is no easy solution for this.
Usually, I would recommend to run the test file corresponding to the feature you’re working in. python test_autograd.py for example.
The best way to run the full test suite remains to push a PR and see what fails on github (you can add the keep-going label there to get all errors) and then run these files locally to make sure you fixed them.

3 Likes