def test_rewriting_idf(self):
     idf_path = os.path.join(self.support_file_dir, "1ZoneEvapCooler.idf")
     idf_processor = IDFProcessor()
     idf_structure = idf_processor.process_file_given_file_path(idf_path)
     self.assertEquals(80, len(idf_structure.objects))
     idd_path = os.path.join(self.support_file_dir, "Energy+.idd")
     idd_processor = IDDProcessor()
     idd_structure = idd_processor.process_file_given_file_path(idd_path)
     out_idf_file_path = tempfile.mktemp(suffix=".idf")
     # print("Writing new idf to: " + out_idf_file_path)
     idf_structure.write_idf(out_idf_file_path, idd_structure)
 def test_minimal_idf(self):
     idf_path = os.path.join(self.support_file_dir, "Minimal.idf")
     processor = IDFProcessor()
     idf_structure = processor.process_file_given_file_path(idf_path)
     self.assertEquals(1, len(idf_structure.objects))
     self.assertAlmostEqual(idf_structure.version_float, 1.1, 1)
 def test_blank_idf(self):
     idf_path = os.path.join(self.support_file_dir, "Blank.idf")
     processor = IDFProcessor()
     processor.process_file_given_file_path(idf_path)
 def test_missing_idf(self):
     idf_path = os.path.join(self.support_file_dir, "NotReallyThere.idf")
     processor = IDFProcessor()
     with self.assertRaises(ProcessingException):
         processor.process_file_given_file_path(idf_path)
 def test_valid_idf_file_complex(self):
     idf_path = os.path.join(self.support_file_dir, "RefBldgLargeHotelNew2004.idf")
     processor = IDFProcessor()
     idf_structure = processor.process_file_given_file_path(idf_path)
     self.assertEquals(1136, len(idf_structure.objects))
 def test_valid_idf_file_simple(self):
     idf_path = os.path.join(self.support_file_dir, "1ZoneEvapCooler.idf")
     processor = IDFProcessor()
     idf_structure = processor.process_file_given_file_path(idf_path)
     self.assertEquals(80, len(idf_structure.objects))