Changeset 5262


Ignore:
Timestamp:
Jan 16, 2017, 4:38:32 PM (10 months ago)
Author:
hongpum
Message:

Minor changes to make the test scripts compatible with py3

Location:
icGREP/icgrep-devel/QA
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/QA/editd/run_all.py

    r5225 r5262  
    77        option_parser.add_option('-e', '--exec_dir', dest = 'exec_dir', type='string', default='.', help = 'executable directory')
    88        options, args = option_parser.parse_args(sys.argv[1:])
    9         print options.exec_dir
     9        print(options.exec_dir)
    1010        out_f = open('OutputFiles/reads2', 'w')
    1111        expected_f = open('ExpectedOutput/reads2', 'r')
    1212        call([options.exec_dir+'/editd', '-f', 'TestFiles/reads2', 'chr.fa', '-display'], stdout=out_f)
    1313        if open('OutputFiles/reads2', 'r').read()==expected_f.read():
    14                 print 'Edit Distance test succeeded.'
     14                print('Edit Distance test succeeded.')
    1515        else:
    16                 print 'Edit Distance test failed.'     
     16                print('Edit Distance test failed.')
    1717                exit(1)
  • icGREP/icgrep-devel/QA/greptest.py

    r5045 r5262  
    4040                                idFound = True
    4141                if not idFound:
    42                         print "Expecting id attribute for datafile, but none found."
     42                        print("Expecting id attribute for datafile, but none found.")
    4343                        exit(-1)
    4444                outfpath = os.path.join(options.datafile_dir, filename)
     
    9191                grep_cmd = "%s -c '%s' %s" % (grep_program_under_test, escape_quotes(regexp), os.path.join(options.datafile_dir, datafile))
    9292                if options.verbose:
    93                     print "Doing: " + grep_cmd
     93                    print("Doing: " + grep_cmd)
    9494                try:
    9595                    grep_out = subprocess.check_output(grep_cmd.encode('utf-8'), cwd=options.exec_dir, shell=True)
     
    138138            os.mkdir(options.datafile_dir)
    139139        if not os.path.isdir(options.datafile_dir):
    140             print "Cannot use %s as working test file directory.\n" % options.datafile_dir
     140            print("Cannot use %s as working test file directory.\n" % options.datafile_dir)
    141141            sys.exit(1)
    142142        grep_program_under_test = args[0]
Note: See TracChangeset for help on using the changeset viewer.