Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Benjamin Jakimow
EO Time Series Viewer
Commits
e897048b
Commit
e897048b
authored
Nov 07, 2020
by
Benjamin Jakimow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed tests
parent
94e2bef2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
67 deletions
+3
-67
.gitlab-ci.yml
.gitlab-ci.yml
+1
-1
tests/test_labeling.py
tests/test_labeling.py
+2
-2
tests/test_main.py
tests/test_main.py
+0
-32
tests/test_maptools.py
tests/test_maptools.py
+0
-32
No files found.
.gitlab-ci.yml
View file @
e897048b
...
...
@@ -19,7 +19,7 @@ cache:
-
venv/
before_script
:
-
apt-get update
-
apt-get update
-
apt-get -y install git-lfs
-
apt-get install -y wget
-
apt-get install -y unzip
...
...
tests/test_labeling.py
View file @
e897048b
...
...
@@ -122,8 +122,8 @@ class TestLabeling(EOTSVTestCase):
canvas
.
setTSD
(
tsd
)
canvas
.
setMapView
(
mv
)
pos
=
QPoint
(
int
(
canvas
.
width
()
*
0.5
),
int
(
canvas
.
height
()
*
0.5
))
menu
=
canvas
.
context
Menu
(
pos
)
self
.
assertIsInstance
(
menu
,
QMenu
)
menu
=
Q
Menu
()
canvas
.
populateContextMenu
(
menu
,
pos
)
def
findLabelAction
(
menu
)
->
QAction
:
for
a
in
menu
.
actions
():
...
...
tests/test_main.py
View file @
e897048b
...
...
@@ -48,38 +48,6 @@ class TestMain(EOTSVTestCase):
QApplication
.
processEvents
()
super
().
tearDown
()
def
test_read_init
(
self
):
"""Test that the plugin __init__ will validate on plugins.qgis.org."""
# You should update this list according to the latest in
# https://github.com/qgis/qgis-django/blob/master/qgis-app/plugins/validator.py
required_metadata
=
[
'name'
,
'description'
,
'version'
,
'qgisMinimumVersion'
,
'email'
,
'author'
]
file_path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
os
.
pardir
,
'metadata.txt'
))
metadata
=
[]
parser
=
configparser
.
ConfigParser
()
parser
.
optionxform
=
str
parser
.
read
(
file_path
)
message
=
'Cannot find a section named "general" in %s'
%
file_path
assert
parser
.
has_section
(
'general'
),
message
metadata
.
extend
(
parser
.
items
(
'general'
))
for
expectation
in
required_metadata
:
message
=
(
'Cannot find metadata "%s" in metadata source (%s).'
%
(
expectation
,
file_path
))
self
.
assertIn
(
expectation
,
dict
(
metadata
),
message
)
def
test_TimeSeriesViewer
(
self
):
from
eotimeseriesviewer.main
import
EOTimeSeriesViewer
TSV
=
EOTimeSeriesViewer
()
...
...
tests/test_maptools.py
View file @
e897048b
...
...
@@ -41,38 +41,6 @@ class TestMapTools(EOTSVTestCase):
"""
def
test_read_init
(
self
):
"""Test that the plugin __init__ will validate on plugins.qgis.org."""
# You should update this list according to the latest in
# https://github.com/qgis/qgis-django/blob/master/qgis-app/plugins/validator.py
required_metadata
=
[
'name'
,
'description'
,
'version'
,
'qgisMinimumVersion'
,
'email'
,
'author'
]
file_path
=
os
.
path
.
abspath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
os
.
pardir
,
'metadata.txt'
))
metadata
=
[]
parser
=
configparser
.
ConfigParser
()
parser
.
optionxform
=
str
parser
.
read
(
file_path
)
message
=
'Cannot find a section named "general" in %s'
%
file_path
assert
parser
.
has_section
(
'general'
),
message
metadata
.
extend
(
parser
.
items
(
'general'
))
for
expectation
in
required_metadata
:
message
=
(
'Cannot find metadata "%s" in metadata source (%s).'
%
(
expectation
,
file_path
))
self
.
assertIn
(
expectation
,
dict
(
metadata
),
message
)
def
test_TimeSeriesViewer
(
self
):
from
eotimeseriesviewer.main
import
EOTimeSeriesViewer
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment