Skip to content
Permalink
Browse files

[mssql] Skip some tests on Travis which fail because of msodbcsql seg…

…faults
  • Loading branch information
nyalldawson committed Oct 15, 2018
1 parent c6dda7b commit e33caa4902fb7170bf6496e5e89b7c4c75e3c734
Showing with 33 additions and 1 deletion.
  1. +33 −1 tests/src/python/test_provider_mssql.py
@@ -43,7 +43,7 @@ class TestPyQgsMssqlProvider(unittest.TestCase, ProviderTestCase):
@classmethod
def setUpClass(cls):
"""Run before all tests"""
# These are the connection details for the SQL Server instance running on Travis
# These are the connection details for the SQL Server instance running on Travis
cls.dbconn = "service='testsqlserver' user=sa password='<YourStrong!Passw0rd>' "
if 'QGIS_MSSQLTEST_DB' in os.environ:
cls.dbconn = os.environ['QGIS_MSSQLTEST_DB']
@@ -148,6 +148,36 @@ def uncompiledFilters(self):
])
return filters

def testGetFeaturesUncompiled(self):
if os.environ.get('TRAVIS', '') == 'true':
return
super().testGetFeaturesUncompiled()

def testGetFeaturesExp(self):
if os.environ.get('TRAVIS', '') == 'true':
return
super().testGetFeaturesExp()

def testSubsetString(self):
if os.environ.get('TRAVIS', '') == 'true':
return
super().testSubsetString()

def testGetFeaturesThreadSafety(self):
if os.environ.get('TRAVIS', '') == 'true':
return
super().testGetFeaturesThreadSafety()

def testOrderBy(self):
if os.environ.get('TRAVIS', '') == 'true':
return
super().testOrderBy()

def testOrderByCompiled(self):
if os.environ.get('TRAVIS', '') == 'true':
return
super().testOrderByCompiled()

# HERE GO THE PROVIDER SPECIFIC TESTS
def testDateTimeTypes(self):
vl = QgsVectorLayer('%s table="qgis_test"."date_times" sql=' %
@@ -204,6 +234,7 @@ def testFloatDecimalFields(self):
self.assertIsInstance(f.attributes()[dec_idx], float)
self.assertEqual(f.attributes()[dec_idx], 1.123)

@unittest.skipIf(os.environ.get('TRAVIS', '') == 'true', 'Failing on Travis')
def testCreateLayer(self):
layer = QgsVectorLayer("Point?field=id:integer&field=fldtxt:string&field=fldint:integer",
"addfeat", "memory")
@@ -238,6 +269,7 @@ def testCreateLayer(self):
geom = [f.geometry().asWkt() for f in new_layer.getFeatures()]
self.assertEqual(geom, ['Point (1 2)', '', 'Point (3 2)', 'Point (4 3)'])

@unittest.skipIf(os.environ.get('TRAVIS', '') == 'true', 'Failing on Travis')
def testCreateLayerMultiPoint(self):
layer = QgsVectorLayer("MultiPoint?crs=epsg:3111&field=id:integer&field=fldtxt:string&field=fldint:integer",
"addfeat", "memory")

0 comments on commit e33caa4

Please sign in to comment.
You can’t perform that action at this time.