| 1 |
|
| 2 |
import os, sys |
| 3 |
TOPDIR = os.path.abspath(os.path.join(os.path.dirname(__file__),"../..")) |
| 4 |
sys.path.insert(0, TOPDIR) |
| 5 |
|
| 6 |
from random import random |
| 7 |
import math |
| 8 |
|
| •9 |
import tools.unittests |
| 10 |
from wxgeometrie.geolib.routines import (strip_trailing_zeros,) |
| 11 |
from wxgeometrie.mathlib.universal_functions import sin as u_sin, cos as u_cos, tan as u_tan |
| 12 |
|
| •13 |
class GeolibTest(tools.unittests.TestCase): |
| 14 |
def test_strip_trailing_zeros(self): |
| 15 |
self.assertEqual( |
| 16 |
strip_trailing_zeros('.0450*1.54556000+4.2003+a.e00+.003+4.000'), |
| 17 |
'.045*1.54556+4.2003+a.e00+.003+4') |
| 18 |
|