Skip to content

Commit b6ccb30

Browse files
committed
Improved tests [skip ci]
1 parent b57a2e9 commit b6ccb30

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

tests/test_half_vector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def test_from_text(self):
5252
assert np.array_equal(vec.to_numpy(), np.array([1.5, 2, 3]))
5353

5454
def test_from_binary(self):
55-
data = pack('>HH3e', 3, 0, *[1.5, 2, 3])
55+
data = pack('>HH3e', 3, 0, 1.5, 2, 3)
5656
vec = HalfVector.from_binary(data)
5757
assert vec.to_list() == [1.5, 2, 3]
5858
assert np.array_equal(vec.to_numpy(), np.array([1.5, 2, 3]))

tests/test_sparse_vector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def test_from_text(self):
8484
assert np.array_equal(vec.to_numpy(), np.array([1.5, 0, 2, 0, 3, 0]))
8585

8686
def test_from_binary(self):
87-
data = pack('>iii3i3f', 6, 3, 0, *[0, 2, 4], *[1.5, 2, 3])
87+
data = pack('>iii3i3f', 6, 3, 0, 0, 2, 4, 1.5, 2, 3)
8888
vec = SparseVector.from_binary(data)
8989
assert vec.dimensions() == 6
9090
assert vec.indices() == [0, 2, 4]

tests/test_vector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def test_from_text(self):
5252
assert np.array_equal(vec.to_numpy(), np.array([1.5, 2, 3]))
5353

5454
def test_from_binary(self):
55-
data = pack('>HH3f', 3, 0, *[1.5, 2, 3])
55+
data = pack('>HH3f', 3, 0, 1.5, 2, 3)
5656
vec = Vector.from_binary(data)
5757
assert vec.to_list() == [1.5, 2, 3]
5858
assert np.array_equal(vec.to_numpy(), np.array([1.5, 2, 3]))

0 commit comments

Comments
 (0)