8000
Skip to content

Add additional test coverage ahead of Path conversion - #10700

Merged
jesserockz merged 14 commits into
devfrom
coverage_path
Sep 14, 2025
Merged

Add additional test coverage ahead of Path conversion#10700
jesserockz merged 14 commits into
devfrom
coverage_path

Conversation

@bdraco
@bdraco bdraco commented Sep 13, 2025
Copy link
Copy Markdown
Member

What does this implement/fix?

Adds some more coverage ahead of the Path conversion

supports #10654

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Code quality improvements to existing code or addition of tests
  • Other

Related issue or feature (if applicable):

  • fixes

Pull request in esphome-docs with documentation (if applicable):

  • esphome/esphome-docs#

Test Environment

  • ESP32
  • ESP32 IDF
  • ESP8266
  • RP2040
  • BK72xx
  • RTL87xx
  • nRF52840

Example entry for config.yaml:

# Example config.yaml

Checklist:

  • The code change is tested and works locally.
  • Tests have been added to verify that the new code works (under tests/ folder).

If user exposed functionality or configuration variables are added/changed:

@codecov-commenter
codecov-commenter commented Sep 13, 2025
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.52%. Comparing base (d3592c4) to head (a429b0d).

Additional details and impacted files
@@            Coverage Diff             @@
##              dev   #10700      +/-   ##
==========================================
+ Coverage   65.89%   67.52%   +1.62%     
==========================================
  Files          52       52              
  Lines       10560    10560              
  Branches     1416     1416              
==========================================
+ Hits         6959     7131     +172     
+ Misses       3220     3050     -170     
+ Partials      381      379       -2     

☔ View full report in Codecov by Se 8000 ntry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bdraco
bdraco marked this pull request as ready for review September 13, 2025 19:34
Copilot AI review requested due to automatic review settings September 13, 2025 19:34
Copilot AI left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds comprehensive test coverage for core ESPHome functionality in preparation for Path conversion work, expanding tests for storage JSON, PlatformIO API, and core configuration modules.

  • Adds extensive tests for StorageJSON and EsphomeStorageJSON serialization, deserialization, and file operations
  • Introduces comprehensive PlatformIO API test coverage including idedata caching, stacktrace processing, and build functionality
  • Expands core configuration tests with hostname validation, build path handling, and platform detection

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
tests/unit_tests/test_storage_json.py Adds 300+ lines of tests covering StorageJSON and EsphomeStorageJSON classes with serialization, loading, and equality testing
tests/unit_tests/test_platformio_api.py Adds 400+ lines of tests for PlatformIO API functionality including idedata caching, command execution, and stacktrace processing
tests/unit_tests/core/test_config.py Adds 300+ lines of tests for core configuration validation, hostname checking, and platform detection
tests/unit_tests/conftest.py Adds shared mock fixtures for file operations and external command execution

Comment thread tests/unit_tests/test_platformio_api.py Outdated
@jesserockz
jesserockz merged commit 35dce3c into dev Sep 14, 2025
19 checks passed
@jesserockz
jesserockz deleted the coverage_path branch September 14, 2025 21:31
@bdraco
bdraco commented Sep 14, 2025
Copy link
Copy Markdown
Member Author

Thanks

@github-actions github-actions Bot locked and limited conversation to collaborators Sep 16, 2025
@jesserockz jesserockz added this to the 2025.9.0b3 milestone Sep 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

0