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

Updates.py #154

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Updates.py #154

wants to merge 3 commits into from

Commits on Oct 16, 2024

  1. Update test_allFileMetadata.py

    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
    Khushi-Dua authored Oct 16, 2024
    Configuration menu
    Copy the full SHA
    b88c0d8 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #1 from Khushi-Dua/Khushi-Dua-patch-1

    Update test_allFileMetadata.py
    Khushi-Dua authored Oct 16, 2024
    Configuration menu
    Copy the full SHA
    86bbea8 View commit details
    Browse the repository at this point in the history

Commits on Oct 27, 2024

  1. 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 authored Oct 27, 2024
    Configuration menu
    Copy the full SHA
    317ba28 View commit details
    Browse the repository at this point in the history