Exemple #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)
Exemple #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)
Exemple #3
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)
Exemple #4
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)
Exemple #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)
Exemple #6
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)
Exemple #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)
Exemple #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)
Exemple #9
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)
Exemple #10
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)