Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit acdb3a3

Browse files
committedNov 17, 2022
codegen unit tests
1 parent 93aa4f4 commit acdb3a3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
 

‎src/latexify/codegen/function_codegen_test.py

+9
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,15 @@ def test_visit_call_sum_prod(src_suffix: str, dest_suffix: str) -> None:
228228
"math.prod(i for i in range(n-1))",
229229
r"\prod_{i = {0}}^{{n - {2}}} \mathopen{}\left({i}\mathclose{}\right)",
230230
),
231+
# reduce stop parameter
232+
(
233+
"sum(i for i in range(n+1))",
234+
r"\sum_{i = {0}}^{{n}} \mathopen{}\left({i}\mathclose{}\right)",
235+
),
236+
(
237+
"math.prod(i for i in range(n-1))",
238+
r"\prod_{i = {0}}^{{n - {2}}} \mathopen{}\left({i}\mathclose{}\right)",
239+
),
231240
],
232241
)
233242
def test_visit_call_sum_prod_multiple_comprehension(code: str, latex: str) -> None:

0 commit comments

Comments
 (0)
Please sign in to comment.