text: import pytest
  import numpy as np
  from numpy.testing import assert_array_almost_equal
  
  from context import fiberorient as fo
  
  
  def test_confidence(st_obj):
      test_conf = st_obj.confidence
      true_conf = np.array([[[0.10819485, 0.42774707, 0.42774707, 0.10819485],
                             [0.42774707, 0.68832326, 0.68832326, 0.42774707],
                             [0.42774707, 0.68832326, 0.68832326, 0.42774707],
                             [0.10819485, 0.42774707, 0.42774707, 0.10819485]],
                            [[0.10819485, 0.42774707, 0.42774707, 0.10819485],
                             [0.42774707, 0.68832326, 0.68832326, 0.42774707],
                             [0.42774707, 0.68832326, 0.68832326, 0.42774707],
                             [0.10819485, 0.42774707, 0.42774707, 0.10819485]],
                            [[0.10819485, 0.42774707, 0.42774707, 0.10819485],
                             [0.42774707, 0.68832326, 0.68832326, 0.42774707],
                             [0.42774707, 0.68832326, 0.68832326, 0.42774707],
                             [0.10819485, 0.42774707, 0.42774707, 0.10819485]],
                            [[0.10819485, 0.42774707, 0.42774707, 0.10819485],
                             [0.42774707, 0.68832326, 0.68832326, 0.42774707],
                             [0.42774707, 0.68832326, 0.68832326, 0.42774707],
                             [0.10819485, 0.42774707, 0.42774707, 0.10819485]]])
      assert_array_almost_equal(test_conf, true_conf)
  
  
  def test_vectors(vectors):
      test_vectors = np.zeros_like(vectors)
      test_vectors[..., 0] = 1  # all x
      assert_array_almost_equal(test_vectors, vectors)
  