Test that the environment is correctly extracted from the input
()
| 119 | |
| 120 | |
| 121 | def test_texcode_for_environment(): |
| 122 | """Test that the environment is correctly extracted from the input""" |
| 123 | # environment without arguments |
| 124 | assert _texcode_for_environment("align*") == (r"\begin{align*}", r"\end{align*}") |
| 125 | assert _texcode_for_environment("{align*}") == (r"\begin{align*}", r"\end{align*}") |
| 126 | assert _texcode_for_environment(r"\begin{align*}") == ( |
| 127 | r"\begin{align*}", |
| 128 | r"\end{align*}", |
| 129 | ) |
| 130 | # environment with arguments |
| 131 | assert _texcode_for_environment("{tabular}[t]{cccl}") == ( |
| 132 | r"\begin{tabular}[t]{cccl}", |
| 133 | r"\end{tabular}", |
| 134 | ) |
| 135 | assert _texcode_for_environment("tabular}{cccl") == ( |
| 136 | r"\begin{tabular}{cccl}", |
| 137 | r"\end{tabular}", |
| 138 | ) |
| 139 | assert _texcode_for_environment(r"\begin{tabular}[t]{cccl}") == ( |
| 140 | r"\begin{tabular}[t]{cccl}", |
| 141 | r"\end{tabular}", |
| 142 | ) |
nothing calls this directly
no test coverage detected