Ejemplo n.º 1
0
def test_getobject():
    """py.test for getobject"""
    thedata = (
        ('ZONE', 'PLENUM-1', bunchdt['ZONE'][0]), # key, name, theobject
        ('ZONE', 'PLENUM-1'.lower(), bunchdt['ZONE'][0]), # key, name, theobject
        ('ZONE', 'PLENUM-A', None), # key, name, theobject
        ('ZONEHVAC:EQUIPMENTCONNECTIONS', 'SPACE1-1',
         bunchdt['ZONEHVAC:EQUIPMENTCONNECTIONS'][0]), # key, name, theobject
    )
    for key, name, theobject in thedata:
        result = modeleditor.getobject(bunchdt, key, name)
        assert result == theobject
Ejemplo n.º 2
0
def test_getobject():
    """py.test for getobject"""
    thedata = (
        ("ZONE", "PLENUM-1", bunchdt["ZONE"][0]),  # key, name, theobject
        # key, name, theobject
        ("ZONE", "PLENUM-1".lower(), bunchdt["ZONE"][0]),
        ("ZONE", "PLENUM-A", None),  # key, name, theobject
        (
            "ZONEHVAC:EQUIPMENTCONNECTIONS",
            "SPACE1-1",
            bunchdt["ZONEHVAC:EQUIPMENTCONNECTIONS"][0],
        ),  # key, name, theobject
    )
    for key, name, theobject in thedata:
        result = modeleditor.getobject(bunchdt, key, name)
        assert result == theobject