-
Notifications
You must be signed in to change notification settings - Fork 10
Implement config unit testing #516
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
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is ✅ All tests successful. No failed tests found.
📢 Thoughts on this report? Let us know! |
9c5a784
to
782bcfd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds new utility modules for generating random environment values and managing temporary resource changes, expands package exports, reorganizes tests, updates project dependencies, and fixes a guard in config parsing.
- Introduce
random_generators.py
for creating mock Discord tokens, guild IDs, webhook URLs, and organisation IDs. - Add
context_managers.py
with context managers for deleting environment variables, temporary file removal, and settings replacement. - Update
__init__.py
, adjustpyproject.toml
dependency groups and lint rules, remove deprecated tests, add a focused test forgenerate_invite_url
, and guard againstNone
inconfig.py
.
Reviewed Changes
Copilot reviewed 7 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
utils/random_generators.py | New random value generators for environment variables |
utils/context_managers.py | New context managers for env var deletion, file deletion, and settings |
utils/init.py | Exported the new generators and context managers |
tests/test_utils.py | Removed outdated, monolithic test suite |
tests/test_generate_invite_url.py | Added dedicated test for generate_invite_url |
pyproject.toml | Refactored dependency groups and expanded lint ignores for tests |
config.py | Added a truthiness check before calling strip() on config values |
Comments suppressed due to low confidence (2)
utils/random_generators.py:1
- The new random value generators currently lack dedicated unit tests. Add tests to verify that generated tokens, IDs, and URLs match expected patterns and constraints.
"""Module for generating random values for environment variables."""
utils/context_managers.py:1
- Context managers for environment variable deletion, settings replacement, and file deletion are not covered by tests. Consider adding unit tests to ensure they properly delete, restore, and handle edge cases.
"""Module containing context managers for temporary deletions and replacements."""
No description provided.