Skip to content

Commit

Permalink
Clear layers between tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alukach committed Feb 15, 2025
1 parent d606826 commit 5123411
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/conftest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import ee
from pytest import fixture
from qgis.gui import QgisInterface
from qgis.utils import plugins
from PyQt5.QtCore import QSettings, QCoreApplication

Expand Down Expand Up @@ -33,3 +34,8 @@ def load_ee_plugin(qgis_app, setup_ee, ee_config):
plugins["ee_plugin"] = plugin
plugin.check_version()
yield qgis_app


@fixture(autoouse=True)
def clean_qgis_iface(qgis_iface: QgisInterface):
qgis_iface.mapCanvas().setLayers([])

0 comments on commit 5123411

Please sign in to comment.