SanderVocke / qoverage

Simple code coverage for QML
GNU General Public License v3.0
4 stars 1 forks source link

Change from .js companion files to collection singleton #55

Closed SanderVocke closed 8 months ago

SanderVocke commented 8 months ago

The current way to dump collection results at program exit is to connect to app.aboutToQuit().

In practice this is often not triggered, in particular also during execution of qmltestrunner.

There is an alternative: use a pure QML module with qmldir file to declare a singleton type. All the tracked files can import the module and call logging functions on the singleton. The singleton can just dump on its onDestruction signal.

codecov[bot] commented 8 months ago

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (6ab931f) 72.69% compared to head (c8e8c12) 79.64%. Report is 1 commits behind head on master.

Files Patch % Lines
qoverage/__main__.py 40.00% 2 Missing and 1 partial :warning:
test/run_example.py 88.88% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #55 +/- ## ========================================== + Coverage 72.69% 79.64% +6.95% ========================================== Files 13 13 Lines 824 845 +21 Branches 157 161 +4 ========================================== + Hits 599 673 +74 + Misses 168 121 -47 + Partials 57 51 -6 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.