code: def test_int_to_Integer():
      # XXX: Warning, don't test with == here.  0.5 == Rational(1, 2) is True!
      app = init_ipython_session()
      app.run_cell("from sympy import Integer")
      app.run_cell("a = 1")
      assert isinstance(app.user_ns["a"], int)
  
      enable_automatic_int_sympification(app)
      app.run_cell("a = 1/2")
      assert isinstance(app.user_ns["a"], Rational)
      app.run_cell("a = 1")
      assert isinstance(app.user_ns["a"], Integer)
      app.run_cell("a = int(1)")
      assert isinstance(app.user_ns["a"], int)
      app.run_cell("a = (1/\n2)")
      assert app.user_ns["a"] == Rational(1, 2)
  
file_path: sympy/sympy/interactive/tests/test_ipython.py
imports: from sympy.interactive.session import init_ipython_session, enable_automatic_symbols, enable_automatic_int_sympification
  from sympy.core import Symbol, Rational, Integer
  from sympy.external import import_module
  from sympy.testing.pytest import raises
label_desc: Use image node_id 2 for calling a global function with example usage: test_int_to_Integer() without return types