Tested cartesian plane utility
There are no docstrings. What do these functions do? What do they return?
The function pytagoras is already built into Python under the name math.hypot.
In point_in_line it appears that a line is being represented by a slope \$ m \$ and a y-intercept \$ b \$. But not all lines can be represented in this form! In particular, vertical lines have no slope or y-intercept.

It is more robust to represent a line in one of these three forms:


Two different points \$ p_0 \$ and \$ p_1 \$ on the line.
A point \$ p \$ on the line and a vector \$ v \$ along the line.
A vector \$ n \$ normal to the line, and its perpendicular distance from the origin \$ d \$.

The function average is built into Python under the name statistics.mean.
Much of this code is awkward because points are represented by Python tuples or lists. A simple operation like subtracting two points (in distance) requires disassembling the points into their elements, subtracting the elements, and then reassembling the result. If the code represented points using some kind of vector data structure, then a lot of it could be simplified.

For example, if the implementations were written very simply like this:

from math import hypot

def distance(p, q):
    """Return the distance from p to q."""
    return hypot(*(p - q))

def middle_point(p, q):
    """Return a point halfway between p and q."""
    return 0.5 * (p + q)


Then using the built-in turtle.Vec2D:

&gt;&gt;&gt; from turtle import Vec2D
&gt;&gt;&gt; distance(Vec2D(0, 0), Vec2D(3, 4))
5.0
&gt;&gt;&gt; middle_point(Vec2D(1, 2), Vec2D(3, 4))
(2.00,3.00)


(Note that I don't actually recommend that you use turtle.Vec2D. This vector class is very basic: it doesn't have dot products or cross products or even division. But it's built into Python, so you can experiment with it without having to download or install anything. For actual use, NumPy arrays would be good, or pygame.math.Vector2, or something pure-Python like my vector.py.)
The unit test cases are always the same. There's nothing wrong with this, but it seems a bit wasteful, because every time you run the tests they go through the same steps. If a case passed last time you ran it, and you haven't changed the function under test, then it's certain to pass this time. All the test is protecting you against is a regression: it doesn't help you find new bugs.

A technique that sometimes does find new bugs is randomizing the test case. For example, we could test the distance function by generating random points that are a known distance apart:

import random

def test_distance(self):
    z = 1000000
    u = random.uniform
    p = Vec2D(u(-z, z), u(-z, z))
    self.assertEqual(cartesian.distance(p, p), 0)
    d = u(0, z)
    q = p + Vec2D(0, d).rotate(u(0, 360))
    self.assertAlmostEqual(cartesian.distance(p, q), d)
    self.assertAlmostEqual(cartesian.distance(q, p), d)


Then each time the test case is run a different set of points will be tested.

If you actually do get an error from a randomized test case, you'll want to reproduce it for debugging. How do you do that when it's random? You need to seed the random number generator when the test suite starts, and record the seed, for example like this:

import binascii
import os
seed = os.urandom(16)
print("seed:", binascii.hexlify(seed))
random.seed(seed)