()
| 1233 | |
| 1234 | # %% history |
| 1235 | def test_history_bool(): |
| 1236 | |
| 1237 | b1 = box(1, 1, 1) |
| 1238 | b2 = box(1, 0.5, 0.1) |
| 1239 | |
| 1240 | hist = History() |
| 1241 | res = cut(b1, b2, history=hist, name="cut") |
| 1242 | |
| 1243 | assert hist[0] == hist["cut"] |
| 1244 | assert b2.face("<Z") in hist["cut"].deleted() |
| 1245 | assert hist["cut"].modified(b1.face("<Z")).size() == 2 |
| 1246 | assert hist["cut"].modified(b1.face("<Z").edge(">X")).size() == 2 |
| 1247 | |
| 1248 | with pytest.raises(KeyError): |
| 1249 | hist["cut"].generated(b1.face(">Z")) |
| 1250 | |
| 1251 | res2 = imprint(res, b2, history=hist, name="imprint") |
| 1252 | |
| 1253 | op = hist["imprint"] |
| 1254 | |
| 1255 | assert isSubshape(op.images(b1.face(">Z")), res2.solid(">Z")) |
| 1256 | |
| 1257 | |
| 1258 | def test_history_extrude(): |
nothing calls this directly
no test coverage detected