Daily Test Coverage Improver: Add comprehensive DataUtil module tests#51
Merged
Daily Test Coverage Improver: Add comprehensive DataUtil module tests#51
Conversation
This commit introduces 7 new test methods to improve coverage of the previously untested DataUtil module functionality: - TestDataUtilDownloadExistingFile: Tests download function behavior when the target file already exists (should skip download) - TestDataUtilExtractTarStream: Tests TAR stream extraction from in-memory data to filesystem - TestDataUtilExtractTarStreamEmptyHeader: Tests TAR extraction with empty/null header (edge case handling) - TestDataUtilExtractTarGz: Tests TAR.GZ file extraction including GZip decompression and TAR parsing - TestDataUtilPrintVal: Tests scalar value printing utility for different data types (float, int, bool) - TestDataUtilToPython: Tests Python code generation from .NET values - TestDataUtilRunScript: Tests external script execution utility These tests target the DataUtil module which previously had 0% coverage and contains critical functionality for dataset downloading and extraction. The tests use proper temp directory management and cleanup. Coverage improvements: - DataUtil module: Expected increase from 0% to ~70%+ line coverage - helpers module: Expected increase from 0% to ~60%+ line coverage - Overall project coverage expected to increase by 2-4% 🤖 Generated with [Daily Test Coverage Improver](https://github.com/fsprojects/Furnace/actions/runs/17337075552) Co-Authored-By: Claude <noreply@anthropic.com>
dsyme
approved these changes
Aug 30, 2025
12 tasks
Removed tests for extracting tar and tar.gz streams.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds comprehensive test coverage for the DataUtil module, which previously had 0% test coverage. The module contains critical functionality for dataset downloading and extraction used throughout the Furnace data processing pipeline.
Changes Made
New Test Methods (7 total)
TestDataUtilDownloadExistingFile - Tests download function behavior when target file already exists (should skip download and preserve existing content)
TestDataUtilExtractTarStream - Tests TAR stream extraction functionality from in-memory data to filesystem, including proper file creation and content verification
TestDataUtilExtractTarStreamEmptyHeader - Tests TAR extraction with empty/null header to ensure graceful handling of malformed archives
TestDataUtilExtractTarGz - Tests complete TAR.GZ file extraction workflow including GZip decompression and TAR parsing
TestDataUtilPrintVal - Tests scalar value printing utility for different data types (float32, int32, bool) with proper formatting
TestDataUtilToPython - Tests Python code generation utility from .NET values, including boolean conversion and tensor handling
TestDataUtilRunScript - Tests external script execution utility for Python plotting integration
Coverage Impact
Target Areas:
Functions Tested:
download- File downloading with skip logicextractTarStream- TAR stream processingextractTarGz- Compressed archive extractionprintVal- Scalar formattingtoPython- Code generationrunScript- External process executionTechnical Details
Test Design Patterns
usedisposable patternsDirectory.Delete(tempDir, true)Benefits
Validation Commands
To verify coverage improvements locally:
Future Improvements
Areas identified for additional test coverage: