From 62d0126d96edb0a9d9537f46a3a4b56d2b19095c Mon Sep 17 00:00:00 2001 From: Kristoffer Richardsson Date: Wed, 17 Nov 2021 15:41:02 +0100 Subject: [PATCH] #863 Modified example test to show suggested structure --- test_python/test_math3d.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/test_python/test_math3d.py b/test_python/test_math3d.py index e4aee7044a..ef8ba655ad 100644 --- a/test_python/test_math3d.py +++ b/test_python/test_math3d.py @@ -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)