22 lines
377 B
Python
22 lines
377 B
Python
from src.compute import project_perspective
|
|
|
|
def test_pers_1():
|
|
|
|
point = (1.0, 2.0, 3.0)
|
|
exp_point = (1/7, 2/7)
|
|
|
|
result = project_perspective(point)
|
|
|
|
assert result == exp_point
|
|
|
|
|
|
def test_pers_2():
|
|
|
|
point = (1.0, 2.0, 3.0)
|
|
exp_point = (200/7, 400/7)
|
|
|
|
result = project_perspective(point, focal_length=2.0, scale=100)
|
|
|
|
assert result == exp_point
|
|
|