Skip to content

Commit

Permalink
#863 Modified example test to show suggested structure
Browse files Browse the repository at this point in the history
  • Loading branch information
krichardsson committed Nov 17, 2021
1 parent 3d02a53 commit 62d0126
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions test_python/test_math3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@
import numpy as np
import cffirmware

def test_conversion_to_numpy():
def test_that_vec_is_converted_to_numpy_array():
# Fixture
v_cf = cffirmware.mkvec(1, 2, 3)
v_np = np.array(v_cf)
assert np.allclose(v_np, np.array([1,2,3]))

# Test
actual = np.array(v_cf)

# Assert
expected = np.array([1, 2, 3])
assert np.allclose(expected, actual)

0 comments on commit 62d0126

Please sign in to comment.