Skip to content

Commit

Permalink
Dox and indentation updates
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jun 11, 2018
1 parent a3d6b98 commit ce6ea18
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion python/core/auto_generated/qgsproject.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsproject.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
11 changes: 7 additions & 4 deletions tests/src/python/test_qgspostgrestransaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand Down Expand Up @@ -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.