-
Notifications
You must be signed in to change notification settings - Fork 63
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
Updates.py #154
base: main
Are you sure you want to change the base?
Updates.py #154
Conversation
changes: 1. Removed Duplicate import pytest 2.Enhanced assertion in test_get_modification_time_existing_file 3.Removed hardcoded path in test_get_modification_time_non_existing_file 4.Clarified modification_time check 5.Temporary file fixture improvement
Update test_allFileMetadata.py
Here’s a concise analysis of the code: 1. **Hardcoded Path for Non-Existent File**: - The test for a non-existent file uses a fixed path, which can lead to issues if the environment changes. Using a dynamic path (like `tmp_path`) ensures portability across platforms. 2. **Assertion Enhancements**: - The test for an existing file asserts `modification_time > 0`, assuming a positive timestamp indicates a valid file. However, adding an `isinstance` check ensures the return type matches expectations, enhancing robustness. 3. **Error Handling Expectations**: - The `test_get_modification_time_non_existing_file` expects `-1` for non-existent files. This assumption should be confirmed by the `AllFileMetadata` class to ensure consistent handling of errors without throwing exceptions. 4. **Improved Descriptions**: - Slightly refining docstrings would clarify the intent of each test, making the code easier to understand and maintain. These adjustments will make the tests more reliable, readable, and adaptable to different environments.
@Khushi-Dua |
Waiting for a response @Khushi-Dua. If no response under 24 hours then this PR will be closed. |
@Kota-Karthik what is PR template? |
@Khushi-Dua |
By following the PR Template, we mean that you fill the fields which shown in the first comment, like mention the issue number and all. In this PR only. And resolve the merge conflicts too. |
@Khushi-Dua reply by tonight or I will be closing this PR. If you need more help, ask your doubts and questions on discord channel. |
I’ve made the changes to the PR as discussed. Everything is now updated and ready for your review. Please let me know if there are any further adjustments needed |
@Khushi-Dua you need to resolve the conflicts in this PR and mention the issue no. this PR fixes, the issue you were assigned, not the PR. |
@Kota-Karthik I see the branch used is main.....think we should ask her to rebase? |
Description
Here’s a concise analysis of the code:
Hardcoded Path for Non-Existent File:
tmp_path
) ensures portability across platforms.Assertion Enhancements:
modification_time > 0
, assuming a positive timestamp indicates a valid file. However, adding anisinstance
check ensures the return type matches expectations, enhancing robustness.Error Handling Expectations:
test_get_modification_time_non_existing_file
expects-1
for non-existent files. This assumption should be confirmed by theAllFileMetadata
class to ensure consistent handling of errors without throwing exceptions.Improved Descriptions:
These adjustments will make the tests more reliable, readable, and adaptable to different environments.
Type of change
Please delete options that are not relevant.
Checklist