Skip to content
Permalink
Browse files
fixed test_qgsmaplayercombobox.py
  • Loading branch information
jakimowb authored and nyalldawson committed Jan 7, 2022
1 parent 9b3e437 commit 6fad66d7d35aff591e60968f6829e306cdfe5b95
Showing with 6 additions and 1 deletion.
  1. +6 −1 tests/src/python/test_qgsmaplayercombobox.py
@@ -268,10 +268,14 @@ def testProject(self):
QgsProject.instance().clear()
lA = create_layer('lA')
lB = create_layer('lB')
QgsProject.instance().addMapLayer(lA)

projectA = QgsProject.instance()
projectB = QgsProject()

projectA.addMapLayer(lA)
projectB.addMapLayer(lB)
cb = QgsMapLayerComboBox()

self.assertEqual(cb.currentLayer(), lA)

m.setProject(projectB)
@@ -280,6 +284,7 @@ def testProject(self):
m.setProject(projectA)
self.assertEqual(cb.currentLayer(), lA)

QgsProject.instance().clear()

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

0 comments on commit 6fad66d

Please sign in to comment.