def test_makezone():
    """py.test for makezones()"""
    data = Zone_Data
    result = eplusgeom.makezones(Zone_Data.dct)
    eplustxt = Zone_Data.eplustxt
    for resultline, eplusline in zip(result.splitlines(), eplustxt.splitlines()):
        assert resultline == eplusline
def makeidf(txt):
    """make idf file from the file generated by sketchup"""
    dct = readsketchup.readsketchup(txt)
    dct = readsketchup.duplicatewindows(dct)
    dct = readsketchup.inch2meters(dct)
    zonestxt = eplusgeom.makezones(dct)
    wallstxt = eplusgeom.makewalls(dct)
    windowstxt = eplusgeom.makewindows(dct)

    snippet1 = """
VERSION,
    1.3;                     !- Version Identifier

!-   ===========  ALL OBJECTS IN CLASS: BUILDING ===========

BUILDING,
    Building,                !- Building Name
    0.,                      !- North Axis {deg}
    City,                    !- Terrain
    0.04,                    !- Loads Convergence Tolerance Value {W}
    0.4,                     !- Temperature Convergence Tolerance Value {deltaC}
    FullExterior,            !- Solar Distribution
    25;                      !- Maximum Number of Warmup Days


"""
    snippet2 = """
!-   ===========  ALL OBJECTS IN CLASS: SURFACEGEOMETRY ===========

SurfaceGeometry,
    UpperLeftCorner,         !- SurfaceStartingPosition
    CCW,        !- VertexEntry
    WCS;                     !- CoordinateSystem


"""


    eplustxt = snippet1 + zonestxt + snippet2 + wallstxt + windowstxt
    eplustxt = eplustxt.replace('\n', '\r\n')
    return eplustxt