diffusers icon indicating copy to clipboard operation
diffusers copied to clipboard

Migrate lora pipeline tests to use `pytest`

Open sayakpaul opened this issue 3 months ago • 1 comments

What does this PR do?

Migrates the LoRA pipeline tests (tests/lora/) to pure pytest because it has multiple advantages.

Summary of changes

  1. Use proper pytest fixtures wherever possible. This applies to tmpdirname, base_pipe_output, etc. This also helps in reducing LoC.
  2. Replace self.assert* methods with simpler asserts.
  3. Integration tests had setUp and tearDown methods. Those have been replaced with proper pytest fixtures 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 :)

sayakpaul avatar Oct 03 '25 07:10 sayakpaul

@DN6 a gentle ping 😅

sayakpaul avatar Nov 20 '25 04:11 sayakpaul

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.

sayakpaul avatar Dec 15 '25 12:12 sayakpaul