jmcarp opened a new pull request #12951: URL: https://github.com/apache/airflow/pull/12951
We have talked about switching from unittest-style assertions (like `self.assertEqual(foo, bar)`) to plain pytest-style assertions (like `assert foo == bar`) on slack and the mailing list, but it doesn't seem like we've decided so far. I wanted to send a sample PR to show how this might work. I generated these changes with a one-line command: ``` unittest2pytest -f self_assert tests/core -w ``` If we try to refactor many tests at once, we'll likely run into conflicts, but because we can auto-refactor the code easily, fixing conflicts should be straightforward too. Note that I didn't use the `remove_class` fixer or move test setup into fixtures--this just concerns assertion style. Does this seem like an improvement? If so, we can refactor tests module by module, or run `unittest2pytest` on all the tests at once. cc @ashb @potiuk ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
