Skip to content
Permalink
Browse files

Dox and indentation updates

  • Loading branch information
nyalldawson committed Jun 11, 2018
1 parent a3d6b98 commit ce6ea18280e16bbd42a7f382938e93aa17d8a8d8
@@ -601,7 +601,7 @@ Make sure that this is only called when all layers are not in edit mode.

QgsTransactionGroup *transactionGroup( const QString &providerKey, const QString &connString );
%Docstring
Get a transaction group from a provider key and connection string.
Returns the matching transaction group from a provider key and connection string.

Returns None if a matching transaction group is not available.

@@ -585,7 +585,7 @@ class CORE_EXPORT QgsProject : public QObject, public QgsExpressionContextGenera
QMap< QPair< QString, QString>, QgsTransactionGroup *> transactionGroups() SIP_SKIP;

/**
* Get a transaction group from a provider key and connection string.
* Returns the matching transaction group from a provider key and connection string.
*
* Returns nullptr if a matching transaction group is not available.
*
@@ -40,16 +40,18 @@ def setUpClass(cls):
if 'QGIS_PGTEST_DB' in os.environ:
cls.dbconn = os.environ['QGIS_PGTEST_DB']
# Create test layer
cls.vl_b = QgsVectorLayer(cls.dbconn + ' sslmode=disable key=\'pk\' table="qgis_test"."books" sql=', 'books', 'postgres')
cls.vl_a = QgsVectorLayer(cls.dbconn + ' sslmode=disable key=\'pk\' table="qgis_test"."authors" sql=', 'authors', 'postgres')
cls.vl_b = QgsVectorLayer(cls.dbconn + ' sslmode=disable key=\'pk\' table="qgis_test"."books" sql=', 'books',
'postgres')
cls.vl_a = QgsVectorLayer(cls.dbconn + ' sslmode=disable key=\'pk\' table="qgis_test"."authors" sql=',
'authors', 'postgres')

QgsProject.instance().addMapLayer(cls.vl_b)
QgsProject.instance().addMapLayer(cls.vl_a)

cls.relMgr = QgsProject.instance().relationManager()

assert(cls.vl_a.isValid())
assert(cls.vl_b.isValid())
assert (cls.vl_a.isValid())
assert (cls.vl_b.isValid())

def startTransaction(self):
"""
@@ -104,5 +106,6 @@ def test_transactionsGroup(self):
self.assertIsNone(noTg)
self.rollbackTransaction()


if __name__ == '__main__':
unittest.main()

0 comments on commit ce6ea18

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