Skip to content
This repository has been archived by the owner on Nov 4, 2022. It is now read-only.

Add Push To Hub Tests #39

Merged
merged 7 commits into from
Jun 22, 2022
Merged

Add Push To Hub Tests #39

merged 7 commits into from
Jun 22, 2022

Conversation

nateraw
Copy link
Owner

@nateraw nateraw commented Jun 22, 2022

This PR adds a test user token/username and uses them to test push_to_hub.

@nateraw nateraw merged commit 8185e18 into main Jun 22, 2022
@nateraw nateraw deleted the add-push-tests branch June 22, 2022 02:16
Comment on lines +20 to +21
yield repo_id
delete_repo(repo_id, token=HF_TOKEN)
Copy link
Contributor

Choose a reason for hiding this comment

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

you'd need a context manager for this to work, otherwise if while working on the repo_id there's an exception, the repo is never deleted (I think).

Copy link
Owner Author

Choose a reason for hiding this comment

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

I think its safe? Since it's only making "one state change" in the fixture: Ref: https://docs.pytest.org/en/7.1.x/how-to/fixtures.html#safe-fixture-structure

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants