示例#1
0
 def test_set_startup(self, exec2, test_ro_data_dir):
     """
     verify that SAGE_STARTUP_FILE is set by pytest to a-init.sage
     """
     pssf = os.path.join(test_ro_data_dir, conftest.my_sage_startup())
     exec2("print(os.environ['SAGE_STARTUP_FILE'])", pssf)
     remove_no_exc(pssf)
示例#2
0
 def test_init_sage(self, exec2, test_ro_data_dir):
     exec2("None", errout="division by zero")
     pssf = os.path.join(test_ro_data_dir, conftest.my_sage_startup())
     remove_no_exc(pssf)
     pssf4 = os.path.join(test_ro_data_dir,
                          "sage_init_files/syntax_err.sage")
     os.symlink(pssf4, pssf)
示例#3
0
文件: test_env.py 项目: DrXyzzy/smc
 def test_init_sage(self, exec2, test_ro_data_dir):
     exec2("None", errout="division by zero")
     pssf = os.path.join(test_ro_data_dir, conftest.my_sage_startup())
     remove_no_exc(pssf)
     pssf4 = os.path.join(test_ro_data_dir,
                          "sage_init_files/syntax_err.sage")
     os.symlink(pssf4, pssf)
示例#4
0
文件: test_env.py 项目: DrXyzzy/smc
 def test_set_startup(self, exec2, test_ro_data_dir):
     """
     verify that SAGE_STARTUP_FILE is set by pytest to a-init.sage
     """
     pssf = os.path.join(test_ro_data_dir, conftest.my_sage_startup())
     exec2("print(os.environ['SAGE_STARTUP_FILE'])", pssf)
     remove_no_exc(pssf)
示例#5
0
 def test_init_sage(self, exec2, test_ro_data_dir):
     """check for variable defined in startup file"""
     exec2("show_identifiers()", "xyzzy")
     pssf = os.path.join(test_ro_data_dir, conftest.my_sage_startup())
     remove_no_exc(pssf)
     pssf3 = os.path.join(test_ro_data_dir,
                          "sage_init_files/runtime_err.sage")
     os.symlink(pssf3, pssf)
示例#6
0
文件: test_env.py 项目: DrXyzzy/smc
 def test_init_sage(self, exec2, test_ro_data_dir):
     """check for variable defined in startup file"""
     exec2("show_identifiers()", "xyzzy")
     pssf = os.path.join(test_ro_data_dir, conftest.my_sage_startup())
     remove_no_exc(pssf)
     pssf3 = os.path.join(test_ro_data_dir,
                          "sage_init_files/runtime_err.sage")
     os.symlink(pssf3, pssf)
示例#7
0
 def test_init_sage(self, exec2, test_ro_data_dir):
     exec2("None", errout="invalid syntax")
     pssf = os.path.join(test_ro_data_dir, conftest.my_sage_startup())
     remove_no_exc(pssf)
示例#8
0
 def test_init_sage(self, exec2, test_ro_data_dir):
     exec2("pi", pattern="pi")
     pssf = os.path.join(test_ro_data_dir, conftest.my_sage_startup())
     pssf2 = os.path.join(test_ro_data_dir,
                          "sage_init_files/define_var.sage")
     os.symlink(pssf2, pssf)
示例#9
0
文件: test_env.py 项目: DrXyzzy/smc
 def test_init_sage(self, exec2, test_ro_data_dir):
     exec2("None", errout="invalid syntax")
     pssf = os.path.join(test_ro_data_dir, conftest.my_sage_startup())
     remove_no_exc(pssf)
示例#10
0
文件: test_env.py 项目: DrXyzzy/smc
 def test_init_sage(self, exec2, test_ro_data_dir):
     exec2("pi", pattern="pi")
     pssf = os.path.join(test_ro_data_dir, conftest.my_sage_startup())
     pssf2 = os.path.join(test_ro_data_dir,
                          "sage_init_files/define_var.sage")
     os.symlink(pssf2, pssf)