Skip to content

Commit 6bee90f

Browse files
committed
missing 1 dimensional vector tabular test
1 parent 975b98c commit 6bee90f

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/test_api.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,5 +242,22 @@ def test_given_col_align(self) -> None:
242242
1 & 2 \\
243243
3 & 4 \\
244244
\endrule
245+
\end{tabular}"""
246+
)
247+
248+
def test_one_dimensional(self) -> None:
249+
"""One dimensinal vectors are expanded properly."""
250+
mat = np.arange(1, 4)
251+
252+
out = to_tabular(mat)
253+
254+
assert (
255+
out
256+
== r"""\begin{tabular}{c c c}
257+
\toprule
258+
Col 1 & Col 2 & Col 3 \\
259+
\midrule
260+
1 & 2 & 3 \\
261+
\endrule
245262
\end{tabular}"""
246263
)

0 commit comments

Comments
 (0)