MCPcopy
hub / github.com/django/django / test_is_counterclockwise

Method test_is_counterclockwise

tests/gis_tests/geos_tests/test_geos.py:522–529  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

520 )
521
522 def test_is_counterclockwise(self):
523 lr = LinearRing((0, 0), (1, 0), (0, 1), (0, 0))
524 self.assertIs(lr.is_counterclockwise, True)
525 lr.reverse()
526 self.assertIs(lr.is_counterclockwise, False)
527 msg = "Orientation of an empty LinearRing cannot be determined."
528 with self.assertRaisesMessage(ValueError, msg):
529 LinearRing().is_counterclockwise
530
531 def test_is_counterclockwise_geos_error(self):
532 with mock.patch("django.contrib.gis.geos.prototypes.cs_is_ccw") as mocked:

Callers

nothing calls this directly

Calls 3

LinearRingClass · 0.90
assertRaisesMessageMethod · 0.80
reverseMethod · 0.45

Tested by

no test coverage detected