Mercurial > hg > tvii
view tests/test_distance.py @ 86:b56d329c238d
workaround namespace foolishess
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Sun, 17 Dec 2017 14:04:45 -0800 |
parents | c05ce6b7f941 |
children |
line wrap: on
line source
#!/usr/bin/env python """ test distance calculations """ import os import unittest from tvii.distance import distance class TestDistance(unittest.TestCase): def test_triagle(self): """a simple triangle""" x = [0., 3.] y = [4., 0.] assert (distance(x, y) - 5.)**2 < 1e-6 if __name__ == '__main__': unittest.main()