.....................FFFFFF............................................. [ 31%] ........................................................................ [ 62%] ....................................................................F... [ 93%] .............. [100%] =================================== FAILURES =================================== ______ test_ceiling_members_preserve_actual_stair_headroom_and_rotate[0] _______ turn = 0 @pytest.mark.parametrize('turn', range(4)) def test_ceiling_members_preserve_actual_stair_headroom_and_rotate(turn): from hearth.components import CeilingTimbers frame = Frame((20, 0, -15), turn) domain = frame.box(Box((-8, -3, -18), (35, 64, 35))) scene = Scene(13, domain=domain) scene.place('land', Terrain(domain, constant(2))) design = Blueprint((RoomSpec(0, 0, 0, 'living'), RoomSpec(0, 0, 1, 'bedroom')), chimney=True, facade_design=FacadeDesign()) scene.place('house', Building(design, '/land'), frame=frame) scene.finalize() beams = [n for n in scene.nodes.values() if n.type == 'interior.ceiling-timbers'] assert len(beams) == 2 and all(scene.cells(n.path) for n in beams) stairs = scene.nodes['/house/room-0-0-0/stairs'] clear = {p for r in stairs.contract.rules if r.kind == 'clear' for p in r.cells} assert not clear.intersection(set().union(*(scene.cells(n.path) for n in beams))) point = min(scene.cells(beams[0].path)) > assert [n['id'] for n in scene.inspect(point)['chain']][1] == '/house/room-0-0-0' E AssertionError: assert '/house' == '/house/room-0-0-0' E E - /house/room-0-0-0 E + /house test/test_building_detail.py:169: AssertionError ______ test_ceiling_members_preserve_actual_stair_headroom_and_rotate[1] _______ turn = 1 @pytest.mark.parametrize('turn', range(4)) def test_ceiling_members_preserve_actual_stair_headroom_and_rotate(turn): from hearth.components import CeilingTimbers frame = Frame((20, 0, -15), turn) domain = frame.box(Box((-8, -3, -18), (35, 64, 35))) scene = Scene(13, domain=domain) scene.place('land', Terrain(domain, constant(2))) design = Blueprint((RoomSpec(0, 0, 0, 'living'), RoomSpec(0, 0, 1, 'bedroom')), chimney=True, facade_design=FacadeDesign()) scene.place('house', Building(design, '/land'), frame=frame) scene.finalize() beams = [n for n in scene.nodes.values() if n.type == 'interior.ceiling-timbers'] assert len(beams) == 2 and all(scene.cells(n.path) for n in beams) stairs = scene.nodes['/house/room-0-0-0/stairs'] clear = {p for r in stairs.contract.rules if r.kind == 'clear' for p in r.cells} assert not clear.intersection(set().union(*(scene.cells(n.path) for n in beams))) point = min(scene.cells(beams[0].path)) > assert [n['id'] for n in scene.inspect(point)['chain']][1] == '/house/room-0-0-0' E AssertionError: assert '/house' == '/house/room-0-0-0' E E - /house/room-0-0-0 E + /house test/test_building_detail.py:169: AssertionError ______ test_ceiling_members_preserve_actual_stair_headroom_and_rotate[2] _______ turn = 2 @pytest.mark.parametrize('turn', range(4)) def test_ceiling_members_preserve_actual_stair_headroom_and_rotate(turn): from hearth.components import CeilingTimbers frame = Frame((20, 0, -15), turn) domain = frame.box(Box((-8, -3, -18), (35, 64, 35))) scene = Scene(13, domain=domain) scene.place('land', Terrain(domain, constant(2))) design = Blueprint((RoomSpec(0, 0, 0, 'living'), RoomSpec(0, 0, 1, 'bedroom')), chimney=True, facade_design=FacadeDesign()) scene.place('house', Building(design, '/land'), frame=frame) scene.finalize() beams = [n for n in scene.nodes.values() if n.type == 'interior.ceiling-timbers'] assert len(beams) == 2 and all(scene.cells(n.path) for n in beams) stairs = scene.nodes['/house/room-0-0-0/stairs'] clear = {p for r in stairs.contract.rules if r.kind == 'clear' for p in r.cells} assert not clear.intersection(set().union(*(scene.cells(n.path) for n in beams))) point = min(scene.cells(beams[0].path)) > assert [n['id'] for n in scene.inspect(point)['chain']][1] == '/house/room-0-0-0' E AssertionError: assert '/house' == '/house/room-0-0-0' E E - /house/room-0-0-0 E + /house test/test_building_detail.py:169: AssertionError ______ test_ceiling_members_preserve_actual_stair_headroom_and_rotate[3] _______ turn = 3 @pytest.mark.parametrize('turn', range(4)) def test_ceiling_members_preserve_actual_stair_headroom_and_rotate(turn): from hearth.components import CeilingTimbers frame = Frame((20, 0, -15), turn) domain = frame.box(Box((-8, -3, -18), (35, 64, 35))) scene = Scene(13, domain=domain) scene.place('land', Terrain(domain, constant(2))) design = Blueprint((RoomSpec(0, 0, 0, 'living'), RoomSpec(0, 0, 1, 'bedroom')), chimney=True, facade_design=FacadeDesign()) scene.place('house', Building(design, '/land'), frame=frame) scene.finalize() beams = [n for n in scene.nodes.values() if n.type == 'interior.ceiling-timbers'] assert len(beams) == 2 and all(scene.cells(n.path) for n in beams) stairs = scene.nodes['/house/room-0-0-0/stairs'] clear = {p for r in stairs.contract.rules if r.kind == 'clear' for p in r.cells} assert not clear.intersection(set().union(*(scene.cells(n.path) for n in beams))) point = min(scene.cells(beams[0].path)) > assert [n['id'] for n in scene.inspect(point)['chain']][1] == '/house/room-0-0-0' E AssertionError: assert '/house' == '/house/room-0-0-0' E E - /house/room-0-0-0 E + /house test/test_building_detail.py:169: AssertionError _______ test_optional_planting_does_not_change_unrelated_building_branch _______ def test_optional_planting_does_not_change_unrelated_building_branch(): a = lodge_scene(hillside_home(0), 8, garden=False) b = lodge_scene(hillside_home(0), 8, garden=True) cells = a.cells('/building', True) > assert cells == b.cells('/building', True) E assert frozenset({(-... 10, 4), ...}) == frozenset({(-... 10, 4), ...}) E E Extra items in the left set: E (5, 2, -6) E (7, 2, -6) E (6, 2, -6) E Use -v to get more diff test/test_building_detail.py:184: AssertionError ___________ test_boundary_and_facade_degenerate_domains_are_explicit ___________ def test_boundary_and_facade_degenerate_domains_are_explicit(): with pytest.raises(ValueError, match='Facade'): FacadeDesign(height=3, sill=2).openings(11) assert not FacadeDesign().openings(11, exclusions=(Box((0, 0, -1), (10, 4, 0)),)) scene = lodge_scene(hillside_home(0), 12, garden=False) old = dict(scene.blocks) scene.place('empty-border', BoundaryPlanting('/building', '/land', density=0)) assert scene.blocks == old and not scene.cells('/empty-border', True) before = snapshot(scene) > with pytest.raises(ContractError, match='border-domain'): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ E AssertionError: Regex pattern did not match. E Expected regex: 'border-domain' E Actual message: 'input-domain: /invalid-density at None: density=1.1' test/test_building_detail.py:197: AssertionError ________________ test_settlement_corpus_and_boundaries[4-None] _________________ seed = 4, count = None @pytest.mark.parametrize('seed,count', [(i, None) for i in range(8)] + [(0, 3), (0, 6)]) def test_settlement_corpus_and_boundaries(seed, count): > s = settlement_scene(seed, count) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ test/test_geometry_environment.py:180: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hearth/programs.py:184: in settlement_scene scene.place('village', Settlement(designs, domain, '/land')) hearth/kernel/scene.py:148: in place candidate._instantiate(path, component, params or {}, frame, tuple(bindings), None, Scope(self.seed).child(key, seed), complete) hearth/kernel/scene.py:320: in _instantiate self._select_child(path, child, frame, scope) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , parent = '/village' choice = Choice(key='plot-2', candidates=(Child(key='plot-2', component=Building(design=Blueprint(rooms=(RoomSpec(x=0, z=0, lev...gin=(-16, 0, 36), turn=1), bindings=(), seed=None)), score=, tolerance=0.5) frame = Frame(origin=(0, 0, 0), turn=0), scope = Scope(seed=4, key=('village',)) def _select_child(self, parent, choice, frame, scope): accepted = [] rejected = [] path = parent + '/' + choice.key for i, option in enumerate(choice.candidates[:self.limits.search]): trial = self._fork() try: trial._instantiate(path, option.component, option.params, frame.compose(option.frame), option.bindings, parent or None, scope.child(choice.key, option.seed).child(f'alternative-{i}')) trial._check(False, completed_scope=path) accepted.append((choice.score(trial.view, path), i, trial)) except ContractError as exc: rejected.append(exc.diagnostic) if not accepted: rules = {d.rule for d in rejected} if len(rules) == 1 and len(choice.candidates) <= self.limits.search: error = ContractError(next(iter(rules)), path, conditions='All declared alternatives violate the same condition: ' + str(rejected[0])) else: error = SearchExhausted('search-budget', path, conditions=str(rejected)) error.attempts = len(rejected) error.candidates = [d.__dict__ for d in rejected] > raise error E hearth.kernel.errors.ContractError: roof-abutment: /village/plot-2 at None: All declared alternatives violate the same condition: roof-abutment: /village/plot-2/roof-1/cover at (-25, 18, 39): Roof may abut actual solid boundaries only; found minecraft:spruce_trapdoor[facing=south,half=bottom,open=true,powered=false,waterlogged=false] owned by /village/plot-2/room-0-0-2/window-south-1/box hearth/kernel/scene.py:359: ContractError =========================== short test summary info ============================ FAILED test/test_building_detail.py::test_ceiling_members_preserve_actual_stair_headroom_and_rotate[0] FAILED test/test_building_detail.py::test_ceiling_members_preserve_actual_stair_headroom_and_rotate[1] FAILED test/test_building_detail.py::test_ceiling_members_preserve_actual_stair_headroom_and_rotate[2] FAILED test/test_building_detail.py::test_ceiling_members_preserve_actual_stair_headroom_and_rotate[3] FAILED test/test_building_detail.py::test_optional_planting_does_not_change_unrelated_building_branch FAILED test/test_building_detail.py::test_boundary_and_facade_degenerate_domains_are_explicit FAILED test/test_geometry_environment.py::test_settlement_corpus_and_boundaries[4-None] 7 failed, 223 passed in 186.49s (0:03:06)