diffusers
diffusers copied to clipboard
Migrate lora pipeline tests to use `pytest`
What does this PR do?
Migrates the LoRA pipeline tests (tests/lora/) to pure pytest because it has multiple advantages.
Summary of changes
- Use proper
pytestfixtures wherever possible. This applies totmpdirname,base_pipe_output, etc. This also helps in reducing LoC. - Replace
self.assert*methods with simplerasserts. - Integration tests had setUp and tearDown methods. Those have been replaced with proper
pytestfixtures as well.
Will let the CI decide if this is good to go. Will also run the integration tests, meanwhile and fix anything that comes on the way.
Edit: Ran the integration tests and they're good to go :)
@DN6 a gentle ping 😅
I am going to close this PR in the interest of https://github.com/huggingface/diffusers/pull/12822. When the pipeline tests are refactored to follow what #12822 is doing, we will eventually club the tests from tests/lora.