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)
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)
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)
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)
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)