Hi,

In my current company, I recently switched from using Unittest to Py.test
in our Flask application. I loved Py.test and I decided to start rewriting
our tests using Py.test style asserts instead of Unittest asserts
(self.assertEqual, self.assertFalse, et al).

Since we have already written hundreds of thousands of lines of test code,
manually converting the tests would take too long, so I have decided to
automate the process. The automation effort resulted in this script:

https://gist.github.com/canassa/4fd63d682d90f5e3f07e

The script is not perfect, you still need to manually review some changes
it makes, but at least in our project it worked amazingly well, so I
decided to share it with you.


Best,
Cesar Canassa
_______________________________________________
pytest-dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pytest-dev

Reply via email to