Add Address.x and Address.y coordinates

- the Address.x and Address.y properties use the UTMCoordinate class
  behind the scenes
- x and y are simple coordinates in an x-y plane
- the (0, 0) origin is the southwest corner of Address.city.viewport
This commit is contained in:
Alexander Hess 2021-01-02 16:29:50 +01:00
commit 6cb4be80f6
Signed by: alexander
GPG key ID: 344EA5AB10D868E0
5 changed files with 69 additions and 1 deletions

View file

@ -122,3 +122,15 @@ class TestProperties:
result = address.is_primary
assert result is False
def test_x_is_positive(self, address):
"""Test `Address.x` property."""
result = address.x
assert result > 0
def test_y_is_positive(self, address):
"""Test `Address.y` property."""
result = address.y
assert result > 0