Skip to content

Commit

Permalink
attempts to pacify windows runner (which failed on all the examples d…
Browse files Browse the repository at this point in the history
…ue to an unescaped C:\Users mis-interpreting the \U as a unicode escape sequence) and get more information out of macos runner failure of test_loft_py (where the assertion was uninformative)
  • Loading branch information
fischman committed Feb 22, 2025
1 parent 7777baa commit 6a9bf8c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion examples/loft.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@
top_bottom = art.faces().filter_by(GeomType.PLANE)
offset(openings=top_bottom, amount=0.5)

assert abs(art.part.volume - 1306.3405290344635) < 1e-3
want = 1306.3405290344635
got = art.part.volume
delta = abs(got - want)
tolerance = 1e-3
assert delta < tolerance, f'{delta=} is greater than {tolerance=}; {got=}, {want=}'

show(art, names=["art"])
# [End]
2 changes: 1 addition & 1 deletion tests/test_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def assert_example_does_not_raise(self):
[
sys.executable,
"-c",
f"exec(open('{mock_ocp_vscode}').read()); exec(read_and_absolutify('{path}'))",
f"exec(open(r'{mock_ocp_vscode}').read()); exec(read_and_absolutify('{path}'))",
],
capture_output=True,
cwd=tmpdir,
Expand Down

0 comments on commit 6a9bf8c

Please sign in to comment.