Migrate to pytest-style tests
I want to use parametrized tests in a future commit, but pytest does not support them on unittest-style classes. self.subTest() would work too, but I figured it's a good time to migrate these tests to be consistent with the rest of the codebase.
Migrated from D6279 (view on Phabricator)