old_contents: import unittest
  import re, os, shutil, sys
  sys.path.extend(['.','..','py'])
  
  import h2o, h2o_cmd, h2o_hosts
  
  # test some random csv data, and some lineend combinations
  class Basic(unittest.TestCase):
      def tearDown(self):
          h2o.check_sandbox_for_errors()
  
      @classmethod
      def setUpClass(cls):
          global localhost
          localhost = h2o.decide_if_localhost()
          if (localhost):
              h2o.build_cloud(node_count=1)
          else:
              h2o_hosts.build_cloud_with_hosts(node_count=1)
          global SYNDATASETS_DIR
          SYNDATASETS_DIR = h2o.make_syn_dir()
  
      @classmethod
      def tearDownClass(cls):
          h2o.tear_down_cloud()
  
      def test_A_randomdata2(self):
          print "Using smalldata/datagen1.csv as is"
          csvPathname = h2o.find_file('smalldata/datagen1.csv')
          # have to give the separator == comma...otherwise H2O can't deduce it on this dataset
          parseKey = h2o_cmd.parseFile(csvPathname=csvPathname, timeoutSecs=10, header=1, separator=44)
          h2o_cmd.runRFOnly(parseKey=parseKey, trees=1, response_variable=2, timeoutSecs=10, csvPathname=csvPathname)
  
      def test_B_randomdata2_1_lineend(self):
          print "Using smalldata/datagen1.csv to create", SYNDATASETS_DIR, "/datagen1.csv with different line ending" 
          # change lineend, case 1
          csvPathname1 = h2o.find_file('smalldata/datagen1.csv')
          csvPathname2 = SYNDATASETS_DIR + '/datagen1_crlf.csv'
          infile = open(csvPathname1, 'r') 
          outfile = open(csvPathname2,'w') # existing file gets erased
  
          # assume all the test files are unix lineend. 
          # I guess there shouldn't be any "in-between" ones
          # okay if they change I guess.
          for line in infile.readlines():
              outfile.write(line.strip("\n") + "\r")
          infile.close()
          outfile.close()
  
          parseKey = h2o_cmd.parseFile(csvPathname=csvPathname2, timeoutSecs=10, header=1, separator=44)
          h2o_cmd.runRFOnly(parseKey=parseKey, trees=1, response_variable=2, timeoutSecs=10, csvPathname=csvPathname2)
  
  
  if __name__ == '__main__':
      h2o.unit_main()
  
new_contents: import unittest
  import re, os, shutil, sys
  sys.path.extend(['.','..','py'])
  
  import h2o, h2o_cmd, h2o_hosts
  
  # test some random csv data, and some lineend combinations
  class Basic(unittest.TestCase):
      def tearDown(self):
          h2o.check_sandbox_for_errors()
  
      @classmethod
      def setUpClass(cls):
          global localhost
          localhost = h2o.decide_if_localhost()
          if (localhost):
              h2o.build_cloud(node_count=1)
          else:
              h2o_hosts.build_cloud_with_hosts(node_count=1)
          global SYNDATASETS_DIR
          SYNDATASETS_DIR = h2o.make_syn_dir()
  
      @classmethod
      def tearDownClass(cls):
          h2o.tear_down_cloud()
  
      def test_A_randomdata2(self):
          print "Using smalldata/datagen1.csv as is"
          csvPathname = h2o.find_file('smalldata/datagen1.csv')
          # have to give the separator == comma...otherwise H2O can't deduce it on this dataset
          parseKey = h2o_cmd.parseFile(csvPathname=csvPathname, timeoutSecs=10, header=1, separator=44)
          h2o_cmd.runRFOnly(parseKey=parseKey, trees=1, response_variable=2, timeoutSecs=20, csvPathname=csvPathname)
  
      def test_B_randomdata2_1_lineend(self):
          print "Using smalldata/datagen1.csv to create", SYNDATASETS_DIR, "/datagen1.csv with different line ending" 
          # change lineend, case 1
          csvPathname1 = h2o.find_file('smalldata/datagen1.csv')
          csvPathname2 = SYNDATASETS_DIR + '/datagen1_crlf.csv'
          infile = open(csvPathname1, 'r') 
          outfile = open(csvPathname2,'w') # existing file gets erased
  
          # assume all the test files are unix lineend. 
          # I guess there shouldn't be any "in-between" ones
          # okay if they change I guess.
          for line in infile.readlines():
              outfile.write(line.strip("\n") + "\r")
          infile.close()
          outfile.close()
  
          parseKey = h2o_cmd.parseFile(csvPathname=csvPathname2, timeoutSecs=10, header=1, separator=44)
          h2o_cmd.runRFOnly(parseKey=parseKey, trees=1, response_variable=2, timeoutSecs=20, csvPathname=csvPathname2)
  
  
  if __name__ == '__main__':
      h2o.unit_main()
  
subject: increase timeout