Skip to content

Commit e9565cc

Browse files
committed
another test for symbols
1 parent e2c603b commit e9565cc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/core/test_sympy_python_convert.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ def testSymbol(self):
6161
Symbol_Mathics_User_x,
6262
sympy.Symbol(sympy_name(Symbol_Mathics_User_x)),
6363
)
64+
# Sympy symbols without prefix are mapped to symbols in
65+
# System` context:
66+
self.compare_to_mathics(Symbol("x"), sympy.Symbol("x"))
67+
# Notice that a sympy Symbol named "x" is converted
68+
# to the Mathics symbol "System`x", and then, when converted
69+
# back to sympy, goes to sympy.Symbol("_uSystem_x").
6470

6571
def testReal(self):
6672
self.compare(Real("1.0"), sympy.Float("1.0"))

0 commit comments

Comments
 (0)