Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: ignore HF_TOKEN in some unit tests #8634

Merged
merged 1 commit into from
Dec 13, 2024
Merged

test: ignore HF_TOKEN in some unit tests #8634

merged 1 commit into from
Dec 13, 2024

Conversation

anakin87
Copy link
Member

@anakin87 anakin87 commented Dec 13, 2024

Proposed Changes:

Just a quality of life improvement.

When you have a local Hugging Face token (in a HF_TOKEN env var), our tests fail.

So I am using monkeypatch.delenv to ignore this specific environment variable during the test execution.
https://docs.pytest.org/en/stable/how-to/monkeypatch.html

How did you test it?

My local tests now run properly; CI

Checklist

  • I have read the contributors guidelines and the code of conduct
  • I have updated the related issue with new insights and changes
  • I added unit tests and updated the docstrings
  • I've used one of the conventional commit types for my PR title: fix:, feat:, build:, chore:, ci:, docs:, style:, refactor:, perf:, test: and added ! in case the PR includes breaking changes.
  • I documented my code
  • I ran pre-commit hooks and fixed any issue

@anakin87 anakin87 changed the title test: ignore HF_TOKEN in tests test: ignore HF_TOKEN in some unit tests Dec 13, 2024
@anakin87 anakin87 added the ignore-for-release-notes PRs with this flag won't be included in the release notes. label Dec 13, 2024
@coveralls
Copy link
Collaborator

coveralls commented Dec 13, 2024

Pull Request Test Coverage Report for Build 12311963817

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 90.479%

Totals Coverage Status
Change from base Build 12299528849: 0.0%
Covered Lines: 8106
Relevant Lines: 8959

💛 - Coveralls

@anakin87 anakin87 marked this pull request as ready for review December 13, 2024 08:12
@anakin87 anakin87 requested a review from a team as a code owner December 13, 2024 08:12
@anakin87 anakin87 requested review from vblagoje and removed request for a team December 13, 2024 08:12
@anakin87 anakin87 merged commit f2b5f12 into main Dec 13, 2024
27 of 28 checks passed
@anakin87 anakin87 deleted the fix-hf-token-test branch December 13, 2024 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ignore-for-release-notes PRs with this flag won't be included in the release notes. topic:tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants