Skip to content

Commit

Permalink
use random values as a part of Vxy and Vxyz unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bbean23 committed Jun 6, 2024
1 parent 4804cdc commit 1ff88e3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
6 changes: 4 additions & 2 deletions opencsp/common/lib/geometry/test/test_Vxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ def setUp(self) -> None:
self.V1 = Vxy((2, 2))
self.V1_array = np.array([[2], [2]])

self.V2 = Vxy((1, 2))
self.V2_array = np.array([[1], [2]])
v2_1 = np.random.rand()
v2_2 = np.random.rand()
self.V2 = Vxy((v2_1, v2_2))
self.V2_array = np.array([[v2_1], [v2_2]])

def test_Vxy_length_1(self):
# From tuple
Expand Down
7 changes: 5 additions & 2 deletions opencsp/common/lib/geometry/test/test_Vxyz.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@ def setup_class(cls):
cls.V1 = Vxyz((2, 2, 2))
cls.V1_array = np.array([[2], [2], [2]])

cls.V2 = Vxyz((1, 2, 3))
cls.V2_array = np.array([[1], [2], [3]])
v2_1 = np.random.rand()
v2_2 = np.random.rand()
v2_3 = np.random.rand()
cls.V2 = Vxyz((v2_1, v2_2, v2_3))
cls.V2_array = np.array([[v2_1], [v2_2], [v2_3]])

def test_Vxyz_length_1(self):
# From tuple
Expand Down

0 comments on commit 1ff88e3

Please sign in to comment.