Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
See: PR #2534
- Loading branch information
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# -*- coding: utf-8 -*- | ||
"""QGIS Unit tests for QgsServer. | ||
.. note:: This program is free software; you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation; either version 2 of the License, or | ||
(at your option) any later version. | ||
""" | ||
__author__ = 'Alessandro Pasotti' | ||
__date__ = '04/12/2015' | ||
__copyright__ = 'Copyright 2015, The QGIS Project' | ||
# This will get replaced with a git SHA1 when you do a git archive | ||
__revision__ = '$Format:%H$' | ||
|
||
import unittest | ||
from qgis.core import QgsMapLayerRegistry | ||
|
||
|
||
class TestQgsMapLayerRegistry(unittest.TestCase): | ||
|
||
def setUp(self): | ||
pass | ||
|
||
def test_removeMapLayer(self): | ||
This comment has been minimized.
Sorry, something went wrong. |
||
reg = QgsMapLayerRegistry.instance() | ||
# Should not segfault | ||
reg.removeMapLayers(['not_exists']) | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() |
Might want to give you test methods at a better name:
test_RemoveLayerShouldNotSegFault
I like descriptive test method name :) Don't feel bad using long names no one is going to type it out.