Skip to content
Permalink
Browse files

Add python_version to json output from qgis_process tool

  • Loading branch information
nyalldawson committed Apr 22, 2021
1 parent 45a9309 commit ff9cb1963b82532419636df693a60f4c81d12258
Showing with 7 additions and 0 deletions.
  1. +1 −0 src/process/qgsprocess.cpp
  2. +6 −0 tests/src/python/test_qgsprocessexecutable.py
@@ -1083,6 +1083,7 @@ void QgsProcessingExec::addVersionInformation( QVariantMap &json )
json.insert( QStringLiteral( "qgis_code_revision" ), Qgis::devVersion() );
}
json.insert( QStringLiteral( "qt_version" ), qVersion() );
json.insert( QStringLiteral( "python_version" ), PYTHON_VERSION );
json.insert( QStringLiteral( "gdal_version" ), GDALVersionInfo( "RELEASE_NAME" ) );
json.insert( QStringLiteral( "geos_version" ), GEOSversion() );

@@ -80,6 +80,7 @@ def testPluginsJson(self):
self.assertIn('gdal_version', res)
self.assertIn('geos_version', res)
self.assertIn('proj_version', res)
self.assertIn('python_version', res)
self.assertIn('qt_version', res)
self.assertIn('qgis_version', res)
self.assertIn('plugins', res)
@@ -102,6 +103,7 @@ def testAlgorithmsListJson(self):
self.assertIn('gdal_version', res)
self.assertIn('geos_version', res)
self.assertIn('proj_version', res)
self.assertIn('python_version', res)
self.assertIn('qt_version', res)
self.assertIn('qgis_version', res)

@@ -135,6 +137,7 @@ def testAlgorithmHelpJson(self):
self.assertIn('gdal_version', res)
self.assertIn('geos_version', res)
self.assertIn('proj_version', res)
self.assertIn('python_version', res)
self.assertIn('qt_version', res)
self.assertIn('qgis_version', res)

@@ -192,6 +195,7 @@ def testAlgorithmRunJson(self):
self.assertIn('gdal_version', res)
self.assertIn('geos_version', res)
self.assertIn('proj_version', res)
self.assertIn('python_version', res)
self.assertIn('qt_version', res)
self.assertIn('qgis_version', res)

@@ -218,6 +222,7 @@ def testAlgorithmRunListValue(self):
self.assertIn('gdal_version', res)
self.assertIn('geos_version', res)
self.assertIn('proj_version', res)
self.assertIn('python_version', res)
self.assertIn('qt_version', res)
self.assertIn('qgis_version', res)

@@ -261,6 +266,7 @@ def testModelRunJson(self):
self.assertIn('gdal_version', res)
self.assertIn('geos_version', res)
self.assertIn('proj_version', res)
self.assertIn('python_version', res)
self.assertIn('qt_version', res)
self.assertIn('qgis_version', res)
self.assertEqual(res['algorithm_details']['id'], 'Test model')

0 comments on commit ff9cb19

Please sign in to comment.