Skip to content

Commit

Permalink
fix: isort; typing; flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
engnadeau committed Aug 26, 2022
1 parent 6a78fcd commit 958d330
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions tests/test_geometry.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
"""Test geometry."""
import typing
from collections import Counter
from typing import Sequence
from pathlib import Path
from typing import Dict, List, Sequence, Union

import hypothesis.strategies as st
import numpy as np
import numpy.typing as npt
from hypothesis import given
from hypothesis.extra.numpy import arrays
from pytest import raises
from scipy.spatial.transform import Rotation as R
from pytest import fixture, raises
from scipy.spatial.transform import Rotation # type: ignore

import pybotics.geometry
from pybotics.errors import PyboticsError
Expand Down Expand Up @@ -101,7 +102,7 @@ def test_rotation_matrix_x(angle: float) -> None:

# check 3x3 rotation component
actual_rotation = actual_matrix[:3, :3]
expected_rotation = R.from_rotvec(angle * axis_vector).as_matrix()
expected_rotation = Rotation.from_rotvec(angle * axis_vector).as_matrix()
np.testing.assert_allclose(
actual=actual_rotation, desired=expected_rotation, rtol=1e-05, atol=1e-08
) # type: ignore
Expand Down Expand Up @@ -139,7 +140,7 @@ def test_rotation_matrix_y(angle: float) -> None:

# check 3x3 rotation component
actual_rotation = actual_matrix[:3, :3]
expected_rotation = R.from_rotvec(angle * axis_vector).as_matrix()
expected_rotation = Rotation.from_rotvec(angle * axis_vector).as_matrix()
np.testing.assert_allclose(
actual=actual_rotation, desired=expected_rotation, rtol=1e-05, atol=1e-08
) # type: ignore
Expand Down Expand Up @@ -177,7 +178,7 @@ def test_rotation_matrix_z(angle: float) -> None:

# check 3x3 rotation component
actual_rotation = actual_matrix[:3, :3]
expected_rotation = R.from_rotvec(angle * axis_vector).as_matrix()
expected_rotation = Rotation.from_rotvec(angle * axis_vector).as_matrix()
np.testing.assert_allclose(
actual=actual_rotation, desired=expected_rotation, rtol=1e-05, atol=1e-08
) # type: ignore
Expand Down

0 comments on commit 958d330

Please sign in to comment.