Skip to content

Commit

Permalink
extend test
Browse files Browse the repository at this point in the history
  • Loading branch information
JanCaha committed Feb 12, 2022
1 parent ba238b3 commit c68cacb
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions tests/gui/test_dialog_tool_interactive_simplifier.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
from pathlib import Path
import pytest
import time

from pytestqt.qtbot import QtBot

from qgis.core import (QgsProject, QgsVectorLayer, QgsApplication)
from qgis.gui import (QgisInterface, QgsMapCanvas, QgsMapLayerComboBox)
from qgis.PyQt.QtCore import (QThread, QCoreApplication, Qt, pyqtSignal, pyqtBoundSignal)
from qgis.PyQt.QtWidgets import (QSlider, QLabel, QSpinBox, QDialogButtonBox, QComboBox)
from qgis.PyQt.QtCore import (pyqtBoundSignal)
from qgis.PyQt.QtWidgets import (QSlider, QSpinBox, QDialogButtonBox, QComboBox)

from qmapshaper.gui.dialog_tool_interactive_simplifier import InteractiveSimplifierTool

Expand Down Expand Up @@ -52,8 +51,13 @@ def test_1():

qtbot.waitUntil(test_1)

qgis_app.processEvents()
time.sleep(5)
with qtbot.waitSignal(dialog.map_updated):
dialog.generalize_layer()

assert dialog.canvas.layerCount() == 1

assert isinstance(dialog.get_layer_for_project(), QgsVectorLayer)
assert dialog.get_layer_for_project().featureCount() == 404

dialog.hide()

Expand Down

0 comments on commit c68cacb

Please sign in to comment.