Hong-Phuc Bui
2025-05-27 a20fadf394be3bd0a535f11751a8038fe814473d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from streck import line_to_coordinate
EPSILON = 0.001
 
def test_line_to_coordinate():
    line = " 12.4; -5.67  "
    c = line_to_coordinate(line)
    x = c["x"]
    y = c["y"]
    assert abs(- 12.4) < EPSILON
    assert abs(+ 5.67) < EPSILON
 
def test_line_to_coordinate_coma_sep():
    line = " 12,4; -5,67  "
    c = line_to_coordinate(line)
    x = c["x"]
    y = c["y"]
    assert abs(- 12.4) < EPSILON
    assert abs(+ 5.67) < EPSILON