feat: intermetiade test_parameter_argument and test_tabular_columns_parameters

This commit is contained in:
Krzysztof Rudnicki 2023-05-21 11:36:30 +02:00
parent 5afc87f9ed
commit cc8d1e9828
8 changed files with 34 additions and 8 deletions

Binary file not shown.

View File

@ -3,8 +3,8 @@
Here is a table:
\begin{tabular}{p[5cm]}
test
\begin{tabular}{p{5.2pt}}
test2
\end{tabular}
\end{document}

View File

@ -0,0 +1 @@
/usr/bin/python

View File

@ -0,0 +1 @@
python

1
program/ecote/bin/lib64 Symbolic link
View File

@ -0,0 +1 @@
lib

View File

@ -0,0 +1,5 @@
home = /usr/bin
include-system-site-packages = false
version = 3.11.3
executable = /usr/bin/python3.11
command = /usr/bin/python -m venv /home/kuchy/ecote/project/ECOTE/program/ecote/bin

View File

@ -14,7 +14,7 @@ def given_unknown_then_error():
When: N/A
Then: <!DOCTYPE html><html>
"""
assert tabular_columns_parameters("l{5cm}") == "Error!"
assert tabular_columns_parameters("l{1.3cm}") == "Error!"
def given_p_then_array():
"""
@ -22,10 +22,28 @@ def given_p_then_array():
When: N/A
Then: <!DOCTYPE html><html>
"""
assert tabular_columns_parameters("p{5cm}") == ["p", 5, [5, "cm"]]
assert tabular_columns_parameters("p{1.3pt}") == "style=\"vertical-align: top; width: 1.69px;\""
def given_m_then_array():
"""
Given:
When: N/A
Then: <!DOCTYPE html><html>
"""
assert tabular_columns_parameters("m{1.3pt}") == "style=\"vertical-align: middle; width: 1.69px;\""
def given_b_then_array():
"""
Given:
When: N/A
Then: <!DOCTYPE html><html>
"""
assert tabular_columns_parameters("b{1.3pt}") == "style=\"vertical-align: bottom; width: 1.69px;\""
def test_parameter_arguments():
given_empty_then_empty()
given_empty_brackets_then_empty()
given_c_then_array()
given_unknown_then_error()
given_p_then_array()
given_m_then_array()
given_b_then_array()

View File

@ -50,7 +50,7 @@ def given_line_then_array():
When: N/A
Then: <!DOCTYPE html><html>
"""
assert tabular_columns_parameters("|") == ["{style=\"border-left: 1px solid black;\"}"]
assert tabular_columns_parameters("|") == ["style=\"border-left: 1px solid black;\""]
def given_double_line_then_array():
"""
@ -58,7 +58,7 @@ def given_double_line_then_array():
When: N/A
Then: <!DOCTYPE html><html>
"""
assert tabular_columns_parameters("||") == ["{style=\"border-left: 1px solid black;\"}", "{style=\"border-left: 1px solid black;\"}"]
assert tabular_columns_parameters("||") == ["style=\"border-left: 1px solid black;\"", "style=\"border-left: 1px solid black;\""]
def given_c_then_array():
"""