mirror of
https://github.com/AtsushiSakai/PythonRobotics.git
synced 2026-04-22 03:00:22 -04:00
Enhance dubins path docs (#664)
* Engance dubins path docs * Update dubins_path.rst * fix doc artifact link in CI * wip * wip * wip * Update dubins_path.rst * wip * wip * wip * wip * wip
This commit is contained in:
21
tests/test_utils.py
Normal file
21
tests/test_utils.py
Normal file
@@ -0,0 +1,21 @@
|
||||
import conftest # Add root path to sys.path
|
||||
from utils import angle
|
||||
from numpy.testing import assert_allclose
|
||||
import numpy as np
|
||||
|
||||
|
||||
def test_angle_mod():
|
||||
assert_allclose(angle.angle_mod(-4.0), 2.28318531)
|
||||
assert(isinstance(angle.angle_mod(-4.0), float))
|
||||
assert_allclose(angle.angle_mod([-4.0]), [2.28318531])
|
||||
assert(isinstance(angle.angle_mod([-4.0]), np.ndarray))
|
||||
|
||||
assert_allclose(angle.angle_mod([-150.0, 190.0, 350], degree=True),
|
||||
[-150., -170., -10.])
|
||||
|
||||
assert_allclose(angle.angle_mod(-60.0, zero_2_2pi=True, degree=True),
|
||||
[300.])
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
conftest.run_this_test(__file__)
|
||||
Reference in New Issue
Block a user