-
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new blocking rule about trailing slashes, fix translations
- Loading branch information
Showing
7 changed files
with
130 additions
and
20 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
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
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,24 @@ | ||
import unittest | ||
|
||
from qgis.core import QgsProject, QgsVectorLayer | ||
|
||
from lizmap.project_checker_tools import trailing_layer_group_name | ||
from lizmap.widgets.check_project import Error | ||
|
||
__copyright__ = 'Copyright 2023, 3Liz' | ||
__license__ = 'GPL version 3' | ||
__email__ = '[email protected]' | ||
|
||
|
||
class TestProjectTable(unittest.TestCase): | ||
|
||
def test_trailing_spaces(self): | ||
""" Test about trailing spaces in the table. """ | ||
layer = QgsVectorLayer('None?field=field_a:string', ' table', 'memory') | ||
project = QgsProject() | ||
project.addMapLayer(layer) | ||
|
||
results = trailing_layer_group_name(project.layerTreeRoot(), project, []) | ||
self.assertEqual(1, len(results)) | ||
self.assertIsInstance(results[0], Error) | ||
self.assertEqual(' table', results[0].source) |
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 |
---|---|---|
|
@@ -2,6 +2,10 @@ | |
|
||
from lizmap.widgets.check_project import Checks, Error, TableCheck | ||
|
||
__copyright__ = 'Copyright 2023, 3Liz' | ||
__license__ = 'GPL version 3' | ||
__email__ = '[email protected]' | ||
|
||
|
||
class TestProjectTable(unittest.TestCase): | ||
|
||
|
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