# Path: eppy/modeleditor.py
# class NoObjectError(Exception):
# class NotSameObjectError(Exception):
# class IDDNotSetError(Exception):
# class IDDAlreadySetError(Exception):
# class IDF(object):
# def almostequal(first, second, places=7, printit=True):
# def poptrailing(lst):
# def extendlist(lst, i, value=""):
# def newrawobject(data, commdct, key, block=None, defaultvalues=True):
# def addthisbunch(bunchdt, data, commdct, thisbunch, theidf):
# def obj2bunch(data, commdct, obj):
# def namebunch(abunch, aname):
# def addobject(bunchdt, data, commdct, key, theidf, aname=None, **kwargs):
# def getnamedargs(*args, **kwargs):
# def addobject1(bunchdt, data, commdct, key, **kwargs):
# def getobject(bunchdt, key, name):
# def __objecthasfields(bunchdt, data, commdct, idfobject, places=7, **kwargs):
# def getobjects(bunchdt, data, commdct, key, places=7, **kwargs):
# def iddofobject(data, commdct, key):
# def getextensibleindex(bunchdt, data, commdct, key, objname):
# def removeextensibles(bunchdt, data, commdct, key, objname):
# def getfieldcomm(bunchdt, data, commdct, idfobject, fieldname):
# def is_retaincase(bunchdt, data, commdct, idfobject, fieldname):
# def isfieldvalue(bunchdt, data, commdct, idfobj, fieldname, value, places=7):
# def equalfield(bunchdt, data, commdct, idfobj1, idfobj2, fieldname, places=7):
# def getrefnames(idf, objname):
# def getallobjlists(idf, refname):
# def rename(idf, objkey, objname, newname):
# def zonearea(idf, zonename, debug=False):
# def zonearea_floor(idf, zonename, debug=False):
# def zonearea_roofceiling(idf, zonename, debug=False):
# def zone_height_min2max(idf, zonename, debug=False):
# def zoneheight(idf, zonename, debug=False):
# def zone_floor2roofheight(idf, zonename, debug=False):
# def zonevolume(idf, zonename):
# def refname2key(idf, refname):
#     def __init__(self, idfname=None, epw=None):
#     def setiddname(cls, iddname, testing=False):
#     def getiddname(cls):
#     def setidd(cls, iddinfo, iddindex, block, idd_version):
#     def initread(self, idfname):
#     def initreadtxt(self, idftxt):
#     def read(self):
#     def new(self, fname=None):
#     def initnew(self, fname):
#     def newidfobject(self, key, aname="", defaultvalues=True, **kwargs):
#     def popidfobject(self, key, index):
#     def removeidfobject(self, idfobject):
#     def removeallidfobjects(self, idfobject):
#     def copyidfobject(self, idfobject):
#     def getobject(self, key, name):
#     def getextensibleindex(self, key, name):
#     def removeextensibles(self, key, name):
#     def printidf(self):
#     def idfstr(self):
#     def save(self, filename=None, lineendings="default", encoding="latin-1"):
#     def saveas(self, filename, lineendings="default", encoding="latin-1"):
#     def savecopy(self, filename, lineendings="default", encoding="latin-1"):
#     def run(self, **kwargs):
#     def getiddgroupdict(self):
# 
# Path: eppy/iddcurrent.py



from io import StringIO
from eppy import modeleditor
from eppy.iddcurrent import iddcurrent
import pytest
import eppy.idfreader as idfreader
import eppy.snippet as snippet
        ),  # obj
    )
    for obj in thedata:
        key_i = data.dtls.index(obj[0].upper())
        abunch = idfreader.makeabunch(commdct, obj, key_i)
        result = modeleditor.obj2bunch(data, commdct, obj)
        assert result.__repr__() == abunch.__repr__()


def test_iddofobject():
    """py.test of iddofobject"""
    thedata = (
        (
            "VERSION",
            [
                {
                    "idfobj": "Version",
                    "group": "Simulation Parameters",
                    "format": ["singleLine"],
                    "unique-object": [""],
                },
                {
                    "default": ["7.0"],
                    "field": ["Version Identifier"],
                    "required-field": [""],
                },
            ],
        ),  # key, itsidd
    )
    for key, itsidd in thedata:

# Path: eppy/modeleditor.py
# class NoObjectError(Exception):
# class NotSameObjectError(Exception):
# class IDDNotSetError(Exception):
# class IDDAlreadySetError(Exception):
# class IDF(object):
# def almostequal(first, second, places=7, printit=True):
# def poptrailing(lst):
# def extendlist(lst, i, value=""):
# def newrawobject(data, commdct, key, block=None, defaultvalues=True):
# def addthisbunch(bunchdt, data, commdct, thisbunch, theidf):
# def obj2bunch(data, commdct, obj):
# def namebunch(abunch, aname):
# def addobject(bunchdt, data, commdct, key, theidf, aname=None, **kwargs):
# def getnamedargs(*args, **kwargs):
# def addobject1(bunchdt, data, commdct, key, **kwargs):
# def getobject(bunchdt, key, name):
# def __objecthasfields(bunchdt, data, commdct, idfobject, places=7, **kwargs):
# def getobjects(bunchdt, data, commdct, key, places=7, **kwargs):
# def iddofobject(data, commdct, key):
# def getextensibleindex(bunchdt, data, commdct, key, objname):
# def removeextensibles(bunchdt, data, commdct, key, objname):
# def getfieldcomm(bunchdt, data, commdct, idfobject, fieldname):
# def is_retaincase(bunchdt, data, commdct, idfobject, fieldname):
# def isfieldvalue(bunchdt, data, commdct, idfobj, fieldname, value, places=7):
# def equalfield(bunchdt, data, commdct, idfobj1, idfobj2, fieldname, places=7):
# def getrefnames(idf, objname):
# def getallobjlists(idf, refname):
# def rename(idf, objkey, objname, newname):
# def zonearea(idf, zonename, debug=False):
# def zonearea_floor(idf, zonename, debug=False):
# def zonearea_roofceiling(idf, zonename, debug=False):
# def zone_height_min2max(idf, zonename, debug=False):
# def zoneheight(idf, zonename, debug=False):
# def zone_floor2roofheight(idf, zonename, debug=False):
# def zonevolume(idf, zonename):
# def refname2key(idf, refname):
#     def __init__(self, idfname=None, epw=None):
#     def setiddname(cls, iddname, testing=False):
#     def getiddname(cls):
#     def setidd(cls, iddinfo, iddindex, block, idd_version):
#     def initread(self, idfname):
#     def initreadtxt(self, idftxt):
#     def read(self):
#     def new(self, fname=None):
#     def initnew(self, fname):
#     def newidfobject(self, key, aname="", defaultvalues=True, **kwargs):
#     def popidfobject(self, key, index):
#     def removeidfobject(self, idfobject):
#     def removeallidfobjects(self, idfobject):
#     def copyidfobject(self, idfobject):
#     def getobject(self, key, name):
#     def getextensibleindex(self, key, name):
#     def removeextensibles(self, key, name):
#     def printidf(self):
#     def idfstr(self):
#     def save(self, filename=None, lineendings="default", encoding="latin-1"):
#     def saveas(self, filename, lineendings="default", encoding="latin-1"):
#     def savecopy(self, filename, lineendings="default", encoding="latin-1"):
#     def run(self, **kwargs):
#     def getiddgroupdict(self):
# 
# Path: eppy/iddcurrent.py



# Path: tests/test_modeleditor1.py
from io import StringIO
from eppy import modeleditor
from eppy.iddcurrent import iddcurrent
import pytest
import eppy.idfreader as idfreader
import eppy.snippet as snippet

        ),  # obj
    )
    for obj in thedata:
        key_i = data.dtls.index(obj[0].upper())
        abunch = idfreader.makeabunch(commdct, obj, key_i)
        result = modeleditor.obj2bunch(data, commdct, obj)
        assert result.__repr__() == abunch.__repr__()


def test_iddofobject():
    """py.test of iddofobject"""
    thedata = (
        (
            "VERSION",
            [
                {
                    "idfobj": "Version",
                    "group": "Simulation Parameters",
                    "format": ["singleLine"],
                    "unique-object": [""],
                },
                {
                    "default": ["7.0"],
                    "field": ["Version Identifier"],
                    "required-field": [""],
                },
            ],
        ),  # key, itsidd
    )
    for key, itsidd in thedata:

        result = modeleditor.iddofobject(data, commdct, key)