Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fixed test_qgsmaplayercombobox.py
  • Loading branch information
jakimowb authored and nyalldawson committed Jan 7, 2022
1 parent 9b3e437 commit 6fad66d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/src/python/test_qgsmaplayercombobox.py
Expand Up @@ -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)
Expand All @@ -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.