.........FF........F............ [100%] =================================== FAILURES =================================== _____________ test_loft_transform_provenance_and_complete_pair[2] ______________ turn = 2, work = PosixPath('/work/generator/workspace/test/tmp-gifyg5x2') @pytest.mark.parametrize('turn', range(4)) def test_loft_transform_provenance_and_complete_pair(turn, work): scene, design = loft_scene(turn) loft = next(n for n in scene.nodes.values() if n.type == 'room.loft.bedroom') station = next(n for n in scene.nodes.values() if n.path.startswith(loft.path) and n.type == 'furnishing.group.bedroom') point = next(p for p in scene.cells(station.path) if name_of(scene.view.state(p)) == 'red_bed') chain = scene.inspect(point)['chain'] assert [n['type'] for n in chain][:3] == ['furnishing.group.bedroom', 'room.loft.bedroom', 'roof.profile'] assert chain[-1]['id'] == '/house' assert any(a == loft.path and kind == 'supported_by' for a, kind, b in scene.inspect(point)['related']) assert any(a == loft.path and kind == 'connected_to' for a, kind, b in scene.relations) roof = next(n for n in scene.nodes.values() if n.type == 'roof.profile') offer = scene.view.offers(roof.path, 'roof-interior')[0] assert offer.frame == loft.frame lantern = next(n for n in scene.nodes.values() if n.type == 'light.roof-hanger') top = lantern.contract.decisions['top'] assert scene.view.supports(lantern.frame.point((0, top, 0))) assert all(name_of(scene.view.state(lantern.frame.point((0, y, 0)))) == 'chain' for y in range(1, top)) stair = scene.nodes['/house/room-0-0-0/stairs'] facing = parse(scene.view.state(min(scene.cells(stair.path))))[1].get('facing') > assert facing in ('north', 'south', 'east', 'west') E AssertionError: assert None in ('north', 'south', 'east', 'west') test/test_building_space.py:79: AssertionError _____________ test_loft_transform_provenance_and_complete_pair[3] ______________ turn = 3, work = PosixPath('/work/generator/workspace/test/tmp-xxj_qq4h') @pytest.mark.parametrize('turn', range(4)) def test_loft_transform_provenance_and_complete_pair(turn, work): scene, design = loft_scene(turn) loft = next(n for n in scene.nodes.values() if n.type == 'room.loft.bedroom') station = next(n for n in scene.nodes.values() if n.path.startswith(loft.path) and n.type == 'furnishing.group.bedroom') point = next(p for p in scene.cells(station.path) if name_of(scene.view.state(p)) == 'red_bed') chain = scene.inspect(point)['chain'] assert [n['type'] for n in chain][:3] == ['furnishing.group.bedroom', 'room.loft.bedroom', 'roof.profile'] assert chain[-1]['id'] == '/house' assert any(a == loft.path and kind == 'supported_by' for a, kind, b in scene.inspect(point)['related']) assert any(a == loft.path and kind == 'connected_to' for a, kind, b in scene.relations) roof = next(n for n in scene.nodes.values() if n.type == 'roof.profile') offer = scene.view.offers(roof.path, 'roof-interior')[0] assert offer.frame == loft.frame lantern = next(n for n in scene.nodes.values() if n.type == 'light.roof-hanger') top = lantern.contract.decisions['top'] assert scene.view.supports(lantern.frame.point((0, top, 0))) assert all(name_of(scene.view.state(lantern.frame.point((0, y, 0)))) == 'chain' for y in range(1, top)) stair = scene.nodes['/house/room-0-0-0/stairs'] facing = parse(scene.view.state(min(scene.cells(stair.path))))[1].get('facing') > assert facing in ('north', 'south', 'east', 'west') E AssertionError: assert None in ('north', 'south', 'east', 'west') test/test_building_space.py:79: AssertionError ____________ test_actual_loft_damage_detected[wall-enclosure-leak] _____________ damage = 'wall', expected = 'enclosure-leak' @pytest.mark.parametrize('damage,expected', [('wall', 'enclosure-leak'), ('support', 'support'), ('tread', 'support'), ('bed', 'bed-pair'), ('collar', 'expected-geometry'), ('guard', 'expected-geometry')]) def test_actual_loft_damage_detected(damage, expected): scene, _ = loft_scene() if damage == 'wall': part = scene.nodes['/house/roof-floor-0/knees'] q = part.frame.point((5, 1, 0)) elif damage == 'support': part = scene.nodes['/house/roof-floor-0/floor'] q = next(r.cells[0] for r in part.contract.rules if r.kind == 'support') elif damage == 'tread': part = scene.nodes['/house/room-0-0-0/stairs'] q = next(p for p in scene.cells(part.path) if name_of(scene.view.state(p)) == 'spruce_stairs') elif damage == 'bed': q = next(p for p in scene.cells('/house/roof-0/room', True) if name_of(scene.view.state(p)) == 'red_bed') else: kind = 'timber.roof-collars' if damage == 'collar' else 'circulation.aperture-guard' part = next(n for n in scene.nodes.values() if n.type == kind) assert scene.cells(part.path) q = min(scene.cells(part.path)) diagnostics = validate(damaged(scene, q), True) > assert expected in {d.rule for d in diagnostics} E AssertionError: assert 'enclosure-leak' in {'enclosure'} test/test_building_space.py:120: AssertionError =========================== short test summary info ============================ FAILED test/test_building_space.py::test_loft_transform_provenance_and_complete_pair[2] FAILED test/test_building_space.py::test_loft_transform_provenance_and_complete_pair[3] FAILED test/test_building_space.py::test_actual_loft_damage_detected[wall-enclosure-leak] 3 failed, 29 passed in 29.85s