Skip to content

Conversation

@DN6
Copy link
Collaborator

@DN6 DN6 commented Nov 10, 2025

What does this PR do?

Continue to remove unittest dependencies from tests.

Fixes # (issue)

Before submitting

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

Copy link
Member

@sayakpaul sayakpaul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly nits.

test_case
)
return pytest.mark.skipif(
not (is_torch_available() and torch_device != "cpu"), reason="test requires accelerator+PyTorch"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Simpler (as torch_device will fail anyway so we won't need the first check)
  • Easier to ready
Suggested change
not (is_torch_available() and torch_device != "cpu"), reason="test requires accelerator+PyTorch"
torch_device == "cpu", reason="test requires accelerator+PyTorch"

test_case
)
return pytest.mark.skipif(
not (is_torch_available() and torch_device == "cuda"), reason="test requires PyTorch+CUDA"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simpler and easier to read

Suggested change
not (is_torch_available() and torch_device == "cuda"), reason="test requires PyTorch+CUDA"
torch_device != "cuda", reason="test requires PyTorch+CUDA"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants