self.assertEqual(v.quantity, 'Site Outdoor Air Drybulb Temperature')

    def test_report_code(self):
        ""
        self.assertEqual(v.report_code, 7)

    def test_summary(self):
        ""
        self.assertEqual(
            v.summary(),
            '7 - Environment - Site Outdoor Air Drybulb Temperature (C)')

    def test_unit(self):
        ""
        self.assertEqual(v.unit, 'C')

    def test_values(self):
        ""
        self.assertEqual(len(v.values), 24)
        self.assertEqual(str(v.values[0]), '-15.5')


if __name__ == '__main__':

    e = EPEso(fp=r'files\eplusout.eso')
    envs = e.get_environments()
    se = envs[0]
    vs = se.get_interval_variables()
    v = vs[0]
    unittest.main(Test_EPEsoIntervalVariable())
Esempio n. 2
0
from eprun import runsim, EPEnd, EPErr, EPEso

from pprint import pprint
import pandas as pd
import datetime


# code below creates the test files

epresult=runsim(input_filepath=r'files\1ZoneUncontrolled.idf',
                epw_filepath=r'files\USA_CA_San.Francisco.Intl.AP.724940_TMY3.epw',
                sim_dir='sim',
                readvars=False)
end=EPEnd(fp=r'files\eplusout.end')
err=EPErr(fp=r'files\eplusout.err')
eso=EPEso(fp=r'files\eplusout.eso')


class Test_eprun(unittest.TestCase):
    ""
   
    def test_eprun(self):
        ""
        
        self.assertIsInstance(epresult,
                              eprun.eprun.EPResult)
        
        self.assertEqual(epresult.returncode,
                          0)