Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Eric Duminil
Get Baden-Württemberg CityGML Opendata
Commits
5b0ab0ec
Commit
5b0ab0ec
authored
9 months ago
by
Eric Duminil
Browse files
Options
Download
Email Patches
Plain Diff
Testing resolution
parent
e136c0f2
master
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test_zipcode.py
+9
-1
test_zipcode.py
with
9 additions
and
1 deletion
+9
-1
test_zipcode.py
+
9
-
1
View file @
5b0ab0ec
...
@@ -10,6 +10,14 @@ class TestGetCoordinates(unittest.TestCase):
...
@@ -10,6 +10,14 @@ class TestGetCoordinates(unittest.TestCase):
self
.
assertTrue
(
coords
.
startswith
(
'POLYGON ((9.'
))
self
.
assertTrue
(
coords
.
startswith
(
'POLYGON ((9.'
))
self
.
assertTrue
(
' 48.7'
in
coords
)
self
.
assertTrue
(
' 48.7'
in
coords
)
self
.
assertTrue
(
' 9.15'
in
coords
)
self
.
assertTrue
(
' 9.15'
in
coords
)
# Should be detailed enough
self
.
assertTrue
(
len
(
coords
.
split
(
','
))
>
100
)
def
test_get_single_plz_with_coarser_coordinates
(
self
):
coords
=
get_coordinates_by_zipcode
([
'70567'
],
precision
=
1000
)
self
.
assertTrue
(
coords
.
startswith
(
'POLYGON ((9.'
))
# Should be not detailed at all
self
.
assertTrue
(
len
(
coords
.
split
(
','
))
<
10
)
def
test_get_multiple_plz
(
self
):
def
test_get_multiple_plz
(
self
):
# Multiple PLZs
# Multiple PLZs
...
@@ -36,7 +44,7 @@ class TestGetCoordinates(unittest.TestCase):
...
@@ -36,7 +44,7 @@ class TestGetCoordinates(unittest.TestCase):
def
test_get_coords_in_clipboard
(
self
):
def
test_get_coords_in_clipboard
(
self
):
pyperclip
.
copy
(
""
)
pyperclip
.
copy
(
""
)
self
.
assertEqual
s
(
pyperclip
.
paste
(),
""
)
self
.
assertEqual
(
pyperclip
.
paste
(),
""
)
get_coordinates_by_zipcode
([
'70567'
])
get_coordinates_by_zipcode
([
'70567'
])
coords
=
pyperclip
.
paste
()
coords
=
pyperclip
.
paste
()
self
.
assertTrue
(
coords
.
startswith
(
'POLYGON ((9.'
))
self
.
assertTrue
(
coords
.
startswith
(
'POLYGON ((9.'
))
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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
Menu
Explore
Projects
Groups
Snippets