Initial Commit
This commit is contained in:
47
tests/test_installation.py
Normal file
47
tests/test_installation.py
Normal file
@@ -0,0 +1,47 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Test installation and imports."""
|
||||
|
||||
import pytest
|
||||
import sys
|
||||
|
||||
|
||||
def test_python_version():
|
||||
assert sys.version_info.major == 3
|
||||
assert sys.version_info.minor >= 10
|
||||
|
||||
|
||||
def test_numpy_import():
|
||||
import numpy as np
|
||||
assert np.__version__
|
||||
|
||||
|
||||
def test_opencv_import():
|
||||
import cv2
|
||||
assert cv2.__version__
|
||||
|
||||
|
||||
def test_scipy_import():
|
||||
from scipy.spatial.transform import Rotation
|
||||
r = Rotation.from_euler('xyz', [0, 0, 0])
|
||||
assert r is not None
|
||||
|
||||
|
||||
def test_shapely_import():
|
||||
from shapely.geometry import Point, Polygon
|
||||
p = Point(0, 0)
|
||||
assert p is not None
|
||||
|
||||
|
||||
def test_filterpy_import():
|
||||
from filterpy.kalman import ExtendedKalmanFilter
|
||||
ekf = ExtendedKalmanFilter(dim_x=3, dim_z=2)
|
||||
assert ekf is not None
|
||||
|
||||
|
||||
def test_transforms3d_import():
|
||||
import transforms3d
|
||||
assert transforms3d is not None
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
pytest.main([__file__, '-v'])
|
||||
Reference in New Issue
Block a user