Skip to content

Commit

Permalink
* tests/test_polygons.py: New test.
Browse files Browse the repository at this point in the history
  • Loading branch information
bje- committed Nov 21, 2024
1 parent 4887e56 commit 8d1be5b
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/test_polygons.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright (C) 2024 Ben Elliston
#
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.

"""A testsuite for the polygons.py module."""

import unittest

from nemo import polygons


class TestPolygons(unittest.TestCase):
"""Tests for polygons.py."""

def test_centroid(self):
"""Test _centroid function."""
notclosed = [(1, 1), (0, 0), (1, 2), (3, 3)]
with self.assertRaises(ValueError):
polygons._centroid(notclosed)

0 comments on commit 8d1be5b

Please sign in to comment.