This duplicates changes in #132, but I added the doc string to explain the rational behind the test, and the self.subTest() context manager to make the process of examining a failing test more sane.
Because it's divided into sub tests now, we get an error message like this for each failing sub test. And the (test_number=10) in the first line tells you which input is failing. Just grep for test_number=10 in the test file.
Perhaps a better approach would be to move contants into global constants and break the 1 massive test into the 16 individual tests, but @Jude188 did all of the adjustments already, so I left it that way.
Manual QA steps
Ran the tests locally and they pass
Risks
Low as the function didn't change
The tests had bad expected values and they were never caught because of the way the asserts were written
Description of change
This duplicates changes in #132, but I added the doc string to explain the rational behind the test, and the
self.subTest()
context manager to make the process of examining a failing test more sane.Example test run:
Because it's divided into sub tests now, we get an error message like this for each failing sub test. And the
(test_number=10)
in the first line tells you which input is failing. Justgrep
fortest_number=10
in the test file.Perhaps a better approach would be to move contants into global constants and break the 1 massive test into the 16 individual tests, but @Jude188 did all of the adjustments already, so I left it that way.
Manual QA steps
Risks
Rollback steps