@@ -6234,7 +6234,7 @@ void TestQgsProcessing::modelerAlgorithm()
62346234 QCOMPARE ( child.parameterSources ().value ( QStringLiteral ( " b" ) ).at ( 0 ).staticValue ().toInt (), 7 );
62356235 QCOMPARE ( child.parameterSources ().value ( QStringLiteral ( " b" ) ).at ( 1 ).staticValue ().toInt (), 9 );
62366236
6237- QCOMPARE ( child.asPythonCode ( QgsProcessing::PythonQgsProcessingAlgorithmSubclass, extraParams, 4 , 2 ).join ( ' \n ' ), QStringLiteral ( " alg_params = {\n 'a': 5,\n 'b': [7,9],\n 'SOMETHING': SOMETHING_ELSE,\n 'SOMETHING2': SOMETHING_ELSE2\n }\n outputs['my_id'] = processing.run('native:centroids', alg_params, context=context, feedback=feedback, is_child_algorithm=True)" ) );
6237+ QCOMPARE ( child.asPythonCode ( QgsProcessing::PythonQgsProcessingAlgorithmSubclass, extraParams, 4 , 2 ).join ( ' \n ' ), QStringLiteral ( " # desc \n alg_params = {\n 'a': 5,\n 'b': [7,9],\n 'SOMETHING': SOMETHING_ELSE,\n 'SOMETHING2': SOMETHING_ELSE2\n }\n outputs['my_id'] = processing.run('native:centroids', alg_params, context=context, feedback=feedback, is_child_algorithm=True)" ) );
62386238
62396239 QgsProcessingModelOutput testModelOut;
62406240 testModelOut.setChildId ( QStringLiteral ( " my_id" ) );
@@ -6270,7 +6270,7 @@ void TestQgsProcessing::modelerAlgorithm()
62706270 QCOMPARE ( child.modelOutput ( " a" ).description (), QStringLiteral ( " my output" ) );
62716271 child.modelOutput ( " a" ).setDescription ( QStringLiteral ( " my output 2" ) );
62726272 QCOMPARE ( child.modelOutput ( " a" ).description (), QStringLiteral ( " my output 2" ) );
6273- QCOMPARE ( child.asPythonCode ( QgsProcessing::PythonQgsProcessingAlgorithmSubclass, extraParams, 4 , 2 ).join ( ' \n ' ), QStringLiteral ( " alg_params = {\n 'a': 5,\n 'b': [7,9],\n 'SOMETHING': SOMETHING_ELSE,\n 'SOMETHING2': SOMETHING_ELSE2\n }\n outputs['my_id'] = processing.run('native:centroids', alg_params, context=context, feedback=feedback, is_child_algorithm=True)\n results['my_id:a'] = outputs['my_id']['']" ) );
6273+ QCOMPARE ( child.asPythonCode ( QgsProcessing::PythonQgsProcessingAlgorithmSubclass, extraParams, 4 , 2 ).join ( ' \n ' ), QStringLiteral ( " # desc \n alg_params = {\n 'a': 5,\n 'b': [7,9],\n 'SOMETHING': SOMETHING_ELSE,\n 'SOMETHING2': SOMETHING_ELSE2\n }\n outputs['my_id'] = processing.run('native:centroids', alg_params, context=context, feedback=feedback, is_child_algorithm=True)\n results['my_id:a'] = outputs['my_id']['']" ) );
62746274
62756275 // no existent
62766276 child.modelOutput ( " b" ).setDescription ( QStringLiteral ( " my output 3" ) );
0 commit comments