Ticket #12299: trac_12299_test_typos_JVM_mem.patch

File trac_12299_test_typos_JVM_mem.patch, 1.5 KB (added by gutow, 9 years ago)

fix backslash issues and define maximum heap size for JVM

  • sage/interfaces/jmoldata.py

    # HG changeset patch
    # User Jonathan Gutow <gutow@uwosh.edu>
    # Date 1339949803 18000
    # Node ID 01501fcdcd9ec708c323d0017a4dd07815285300
    # Parent  d454c172689892c32b564c4907ac53af86d7fe4f
    Trac 12299 Backslash fix in tests, set JVM max heap size.
    
    diff --git a/sage/interfaces/jmoldata.py b/sage/interfaces/jmoldata.py
    a b  
    160160            sage: archive_name=os.path.join(SAGE_TMP, "archive.jmol.zip")
    161161            sage: D.export_jmol(archive_name)  #not scaled properly...need some more steps.
    162162            sage: testfile = os.path.join(SAGE_TMP, "testimage.png")
    163             sage: script = 'set defaultdirectory "%s"\\n script SCRIPT\\n'%archive_name
     163            sage: script = 'set defaultdirectory "%s"\n script SCRIPT\n'%archive_name
    164164            sage: JData.export_image(targetfile =testfile,datafile = script, image_type="PNG")
    165165            sage: print os.path.exists(testfile)
    166166            True
     
    185185            scratchout = os.path.join(jmolscratch,"jmolout.txt")
    186186            jout=open(scratchout,'w')
    187187            #now call the java application and write the file.
    188             result = subprocess.call(["java","-Xms512m","-jar",jmolpath,"-iox","-g",sizeStr,"-J",launchscript,"-j",imagescript],stdout=jout)
     188            result = subprocess.call(["java","-Xmx512m","-jar",jmolpath,"-iox","-g",sizeStr,"-J",launchscript,"-j",imagescript],stdout=jout)
    189189            jout.close()
    190190        else:
    191191            errStr = "Java Virtual Machine not available.\n"