summaryrefslogtreecommitdiff
path: root/Qwen2.5-Eval/evaluation/latex2sympy/tests/complex_test.py
diff options
context:
space:
mode:
authorzitian-gao <zitian.gao@outlook.com>2025-05-27 16:45:31 +0800
committerzitian-gao <zitian.gao@outlook.com>2025-05-27 16:45:31 +0800
commit7c792461c8e4e4f1f8734fed143630c74e76b27f (patch)
treecf6341ff9f2727424751da7a11a3bea6c39015bb /Qwen2.5-Eval/evaluation/latex2sympy/tests/complex_test.py
parent16815c8c5ec263c4bd1a0af60030c1c0efa1421e (diff)
init eval
Diffstat (limited to 'Qwen2.5-Eval/evaluation/latex2sympy/tests/complex_test.py')
-rwxr-xr-xQwen2.5-Eval/evaluation/latex2sympy/tests/complex_test.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/Qwen2.5-Eval/evaluation/latex2sympy/tests/complex_test.py b/Qwen2.5-Eval/evaluation/latex2sympy/tests/complex_test.py
new file mode 100755
index 0000000..2197141
--- /dev/null
+++ b/Qwen2.5-Eval/evaluation/latex2sympy/tests/complex_test.py
@@ -0,0 +1,21 @@
+from .context import assert_equal
+import pytest
+from sympy import Sum, I, Symbol, Integer
+
+a = Symbol('a', real=True)
+b = Symbol('b', real=True)
+i = Symbol('i', real=True)
+n = Symbol('n', real=True)
+x = Symbol('x', real=True)
+
+
+def test_complex():
+ assert_equal("a+Ib", a + I * b)
+
+
+def test_complex_e():
+ assert_equal("e^{I\\pi}", Integer(-1))
+
+
+def test_complex_sum():
+ assert_equal("\\sum_{i=0}^{n} i \\cdot x", Sum(i * x, (i, 0, n)))