Commit e606e155 authored by Joseph Siddons's avatar Joseph Siddons
Browse files

Merge branch '7-add-ci-cd' into 'main'

Resolve "Add CI/CD"

Closes #7

See merge request nocsurfaceprocesses/geospatialtools!25
parents cade9298 abe864b0
Pipeline #267676 canceled with stages
......@@ -30,11 +30,11 @@ class TestFindNearest(unittest.TestCase):
def test_sorted_warn(self):
with self.assertWarns(SortedWarning):
find_nearest([1., 2., 3.], 2.3, check_sorted=False)
find_nearest([1.0, 2.0, 3.0], 2.3, check_sorted=False)
def test_sorted_error(self):
with self.assertRaises(SortedError):
find_nearest([3., 1., 2.], 2.3)
find_nearest([3.0, 1.0, 2.0], 2.3)
if __name__ == "__main__":
......
......@@ -294,7 +294,7 @@ class TestOctTree(unittest.TestCase):
start = d - dt
end = d + dt
boundary = Rectangle(-180, 180, -90, 90, start, end)
ot = OctTree(boundary, capacity=3)
octree = OctTree(boundary, capacity=3)
quert_rect = Rectangle(140, -160, 40, 50, d, d + timedelta(days=8))
points_want: list[Record] = [
......@@ -311,9 +311,9 @@ class TestOctTree(unittest.TestCase):
]
points.extend(points_want)
for p in points:
ot.insert(p)
octree.insert(p)
res = ot.query(quert_rect)
res = octree.query(quert_rect)
assert len(res) == len(points_want)
assert all([p in res for p in points_want])
......@@ -339,7 +339,7 @@ class TestOctTree(unittest.TestCase):
test_datetime - test_timedelta / 2,
test_datetime + test_timedelta / 2,
)
# TEST: distint locii
# TEST: distinct locii
assert (ellipse.p1_lon, ellipse.p1_lat) != (
ellipse.p2_lon,
ellipse.p2_lat,
......
......@@ -155,7 +155,7 @@ class TestQuadTree(unittest.TestCase):
assert qt_boundary.lat == 0
assert qt_boundary.lat_range == 180
qt = QuadTree(qt_boundary, capacity=3)
quadtree = QuadTree(qt_boundary, capacity=3)
quert_rect = Rectangle(140, -160, 40, 50)
assert quert_rect.lon == 170
......@@ -176,9 +176,9 @@ class TestQuadTree(unittest.TestCase):
]
points.extend(points_want)
for p in points:
qt.insert(p)
quadtree.insert(p)
res = qt.query(quert_rect)
res = quadtree.query(quert_rect)
assert len(res) == len(points_want)
assert all([p in res for p in points_want])
......@@ -188,7 +188,7 @@ class TestQuadTree(unittest.TestCase):
theta = 0
ellipse = Ellipse(12.5, 2.5, d1, d2, theta)
# TEST: distint locii
# TEST: distinct locii
assert (ellipse.p1_lon, ellipse.p1_lat) != (
ellipse.p2_lon,
ellipse.p2_lat,
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment