MCPcopy
hub / github.com/ManimCommunity/manim / test_texcode_for_environment

Function test_texcode_for_environment

tests/module/utils/test_tex.py:121–142  ·  view source on GitHub ↗

Test that the environment is correctly extracted from the input

()

Source from the content-addressed store, hash-verified

119
120
121def 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 )

Callers

nothing calls this directly

Calls 1

_texcode_for_environmentFunction · 0.90

Tested by

no test coverage detected