Skip to content

Add pytest tmp_path #706

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

Merged
merged 1 commit into from
Jun 2, 2025
Merged

Conversation

Dan-Flores
Copy link
Contributor

@Dan-Flores Dan-Flores commented May 30, 2025

This PR adds a tmp_path fixture to test_bad_input_parametrized. By adding this argument, pytest will automatically create a temporary directory to store the decoder in when to_file is tested.

As a result, 'output.mp3' is not leftover after running the following test:
pytest test -vvv -k "test_bad_input_parametrized[to_file]"

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label May 30, 2025
@Dan-Flores Dan-Flores marked this pull request as ready for review May 30, 2025 21:05
Copy link
Member

@NicolasHug NicolasHug left a comment

Choose a reason for hiding this comment

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

Good catch, thank you @Dan-Flores !

@Dan-Flores Dan-Flores merged commit ae50558 into pytorch:main Jun 2, 2025
46 of 47 checks passed
Dan-Flores added a commit to Dan-Flores/torchcodec that referenced this pull request Jun 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants