Skip to content

Commit

Permalink
Create pull_request_template.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Khushi-Dua authored Oct 29, 2024
1 parent 72d514c commit 730ee34
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
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.

0 comments on commit 730ee34

Please sign in to comment.