Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
r-akemii committed Oct 3, 2024
1 parent f068474 commit ec7fa6b
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 14 deletions.
7 changes: 1 addition & 6 deletions test/test_add_zones.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import pytest
from time import sleep
from aequilibrae.utils.db_utils import commit_and_close
from aequilibrae.project.database_connection import database_connection
from qgis.core import QgsProject

from qaequilibrae.modules.project_procedures.adds_zones_dialog import AddZonesDialog
Expand All @@ -18,9 +16,6 @@ def test_add_zones(pt_project, create_polygons_layer):

sleep(2)

with commit_and_close(database_connection("network")) as conn:
num_zones = conn.execute("select count(zone_id) from zones").fetchone()[0]

assert num_zones == 3
assert len(pt_project.project.zoning.all_zones()) == 3

QgsProject.instance().clear()
2 changes: 1 addition & 1 deletion test/test_adds_centroid_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from aequilibrae.utils.db_utils import read_and_close
from aequilibrae.project.database_connection import database_connection
from qgis.core import QgsProject, QgsVectorLayer, QgsField, QgsFeature
from qgis.core import QgsFeature, QgsPointXY, QgsGeometry
from qgis.core import QgsPointXY, QgsGeometry
from qgis.PyQt.QtCore import QVariant

from qaequilibrae.modules.network.adds_connectors_dialog import AddConnectorsDialog
Expand Down
1 change: 1 addition & 0 deletions test/test_load_matrix.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from PyQt5.QtCore import QTimer, QVariant
import numpy as np
from qgis.core import QgsProject, QgsVectorLayer, QgsField, QgsFeature

from qaequilibrae.modules.matrix_procedures.load_matrix_dialog import LoadMatrixDialog


Expand Down
3 changes: 1 addition & 2 deletions test/test_load_project_data.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import pytest
from os.path import join
from shutil import copyfile
from PyQt5.QtCore import Qt
from qgis.core import QgsProject
from qgis.PyQt.QtWidgets import QTabWidget

from qaequilibrae.modules.matrix_procedures.load_project_data import LoadProjectDataDialog


Expand Down
4 changes: 1 addition & 3 deletions test/test_processing_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@
import sqlite3
from os.path import isfile, join
from os import makedirs
from shutil import copyfile
from shapely.geometry import Point
from aequilibrae.matrix import AequilibraeMatrix
from aequilibrae.project import Project
from qgis.core import QgsApplication, QgsProcessingContext, QgsProcessingFeedback
from qgis.core import QgsProject, QgsVectorLayer, QgsCoordinateReferenceSystem
from qgis.core import QgsField
from qgis.core import QgsProject, QgsField
from PyQt5.QtCore import QVariant

from qaequilibrae.modules.common_tools.data_layer_from_dataframe import layer_from_dataframe
Expand Down
1 change: 1 addition & 0 deletions test/test_pt_procedures.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from datetime import datetime
from aequilibrae.transit import Transit
from PyQt5.QtCore import QTimer

from qaequilibrae.modules.public_transport_procedures.gtfs_feed import GTFSFeed
from qaequilibrae.modules.public_transport_procedures.gtfs_importer import GTFSImporter

Expand Down
2 changes: 1 addition & 1 deletion test/test_routing.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pytest
from qgis.core import QgsProject

from qaequilibrae.modules.routing_procedures.tsp_dialog import TSPDialog
from qgis.core import QgsProject


@pytest.mark.parametrize("in_selection", [False, True])
Expand Down
1 change: 1 addition & 0 deletions test/test_shortest_path.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from PyQt5.QtCore import Qt, QTimer
from PyQt5.QtWidgets import QApplication

from qaequilibrae.modules.paths_procedures.show_shortest_path_dialog import ShortestPathDialog


Expand Down
2 changes: 1 addition & 1 deletion test/test_simple_tag.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from aequilibrae.utils.db_utils import commit_and_close
from aequilibrae.project.database_connection import database_connection
from qgis.core import QgsProject, QgsVectorLayer, QgsField, QgsFeature
from qgis.core import QgsFeature, QgsPointXY, QgsGeometry
from qgis.core import QgsPointXY, QgsGeometry
from qgis.PyQt.QtCore import QVariant

from qaequilibrae.modules.gis.simple_tag_dialog import SimpleTagDialog
Expand Down

0 comments on commit ec7fa6b

Please sign in to comment.