tests.geometry package

Submodules

tests.geometry.test_geometry module

Created on Thu Apr 15, 13:26:42 2021

@author: HugoFara

class tests.geometry.test_geometry.TestCircleLineIntersection(methodName='runTest')

Bases: TestCase

Various tests on straight line intersections.

test_crossing()

Test a straight line crossing a circle twice.

test_no_crossing()

Test a line and a circle not crossing each other.

test_tangent()

Test a straight line tangent to a circle.

This is a dangerous test, so we only want a success rate over 90%.

class tests.geometry.test_geometry.TestCircles(methodName='runTest')

Bases: TestCase

Tests for circles.

test_no_inter()

Test two circles not intersecting.

test_radius_ineq()

Test two concentric circles of different radi.

tests.geometry.test_geometry.circle_line_intersection_data(mode)

Prepare the data for testing.

Arguments

modeint

Desired number of intersections between the circle and the line.

Returns

((float, float, float), (float, float, float))

A circle and a line crossing {mode} times

Module contents