mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-14 18:37:58 +00:00
enable flake for Python tests
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# This file is part of Nominatim. (https://nominatim.org)
|
||||
#
|
||||
# Copyright (C) 2024 by the Nominatim developer community.
|
||||
# Copyright (C) 2025 by the Nominatim developer community.
|
||||
# For a full list of authors see the git log.
|
||||
"""
|
||||
Tests for specialised connection and cursor classes.
|
||||
@@ -12,6 +12,7 @@ import psycopg
|
||||
|
||||
import nominatim_db.db.connection as nc
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def db(dsn):
|
||||
with nc.connect(dsn) as conn:
|
||||
@@ -36,6 +37,7 @@ def test_has_column(db, table_factory, name, result):
|
||||
|
||||
assert nc.table_has_column(db, 'stuff', name) == result
|
||||
|
||||
|
||||
def test_connection_index_exists(db, table_factory, temp_db_cursor):
|
||||
assert not nc.index_exists(db, 'some_index')
|
||||
|
||||
@@ -76,6 +78,7 @@ def test_drop_table_non_existing_force(db):
|
||||
with pytest.raises(psycopg.ProgrammingError, match='.*does not exist.*'):
|
||||
nc.drop_tables(db, 'dfkjgjriogjigjgjrdghehtre', if_exists=False)
|
||||
|
||||
|
||||
def test_connection_server_version_tuple(db):
|
||||
ver = nc.server_version_tuple(db)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user