MCPcopy Create free account
hub / github.com/davisking/dlib / test_point

Function test_point

tools/python/test/test_point.py:8–17  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6
7
8def test_point():
9 p = point(27, 42)
10 assert repr(p) == "point(27, 42)"
11 assert str(p) == "(27, 42)"
12 assert p.x == 27
13 assert p.y == 42
14 ser = pickle.dumps(p, 2)
15 deser = pickle.loads(ser)
16 assert deser.x == p.x
17 assert deser.y == p.y
18
19def test_point_assignment():
20 p = point(27, 42)

Callers

nothing calls this directly

Calls 3

pointClass · 0.90
reprFunction · 0.85
strClass · 0.85

Tested by

no test coverage detected