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

feat: add unit tests. #3

Merged
merged 3 commits into from
Jun 22, 2024
Merged

Conversation

siavashyj
Copy link
Owner

Rename project and implement unit tests

Description

This pull request renames the project from "playlist-downloader" to "youtube-playlist-downloader" and implements comprehensive unit tests for the main functionality.

Changes

  • Renamed the main project directory from playlist-downloader to youtube-playlist-downloader
  • Updated .pre-commit-config.yaml with the latest versions of black, isort, and flake8
  • Added a new tests directory with __init__.py and test_main.py
  • Implemented unit tests for all main functions: get_authenticated_service, get_playlists, get_playlist_items, and main
  • Updated README.md with instructions on how to run unit tests
  • Adjusted project structure to better accommodate testing and follow Python package naming conventions

Testing

  • Added pytest as a development dependency
  • Implemented mock objects for YouTube API interactions to enable testing without actual API calls
  • Covered various scenarios including different combinations of playlist retrieval options

How to test

  1. Clone the updated repository
  2. Install dependencies: poetry install
  3. Run the tests: poetry run pytest

Additional Notes

  • The new test suite provides better coverage and should help maintain code quality as the project evolves

Please review the changes and let me know if any further modifications are needed.

@siavashyj siavashyj force-pushed the add-unit-tests-to-playlist-downloader branch from f228407 to f23fb47 Compare June 22, 2024 17:23
@siavashyj siavashyj force-pushed the add-unit-tests-to-playlist-downloader branch from f23fb47 to 2df2b39 Compare June 22, 2024 17:25
@codecov-commenter
Copy link

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment

Thanks for integrating Codecov - We've got you covered ☂️

@siavashyj siavashyj merged commit 803a32c into main Jun 22, 2024
2 checks passed
@siavashyj siavashyj deleted the add-unit-tests-to-playlist-downloader branch June 22, 2024 19:59
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.

2 participants