GispoCoding / pytest-qgis

A pytest plugin for testing QGIS python plugins
GNU General Public License v2.0
29 stars 8 forks source link

Changed QWidget -> QMainWindow to allow the application menu bar. QgsInterface returns a new QToolBar when addToolBar is called #14

Closed JaumeFigueras closed 2 years ago

JaumeFigueras commented 2 years ago

Proposal to solve issue #13

JaumeFigueras commented 2 years ago

I'm quite new to github. I wanted to create two PR, but my two commits appear in one PR. Also I detected that when a plugin calls the addToolBar function from iface, None was returned. But if this function is called a new toolbar has to be returned to the plugin abling it to add actions.

codecov-commenter commented 2 years ago

Codecov Report

Merging #14 (f7da8c3) into main (0c13246) will decrease coverage by 0.41%. The diff coverage is 33.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #14      +/-   ##
==========================================
- Coverage   53.20%   52.79%   -0.42%     
==========================================
  Files           6        6              
  Lines         421      430       +9     
==========================================
+ Hits          224      227       +3     
- Misses        197      203       +6     
Flag Coverage Δ
pytest 52.79% <33.33%> (-0.42%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/pytest_qgis/qgis_interface.py 37.11% <30.00%> (+0.03%) :arrow_up:
src/pytest_qgis/pytest_qgis.py 52.78% <50.00%> (-0.23%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 0c13246...f7da8c3. Read the comment docs.

JaumeFigueras commented 2 years ago

Hello @Joonalai, I accepted your suggestions, added the pre-commit install and changed the PR title as requested. Hope everything is OK now. Thanks for your help!!

JaumeFigueras commented 2 years ago

Thank you for your hints.