Skip to content

Commit

Permalink
test: update test_direct_api to rename shape_to_html
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Poughon committed Dec 20, 2024
1 parent c97a0be commit 36eb3ae
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/test_direct_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
delta,
unwrap_topods_compound,
)
from build123d.jupyter_tools import display
from build123d.jupyter_tools import shape_to_html

DEG2RAD = math.pi / 180
RAD2DEG = 180 / math.pi
Expand Down Expand Up @@ -1633,17 +1633,17 @@ def test_import_stl(self):


class TestJupyter(DirectApiTestCase):
def test_repr_javascript(self):
def test_repr_html(self):
shape = Solid.make_box(1, 1, 1)

# Test no exception on rendering to js
js1 = shape._repr_javascript_()
html1 = shape._repr_html_()

assert "function render" in js1
assert "function render" in html1

def test_display_error(self):
with self.assertRaises(AttributeError):
display(Vector())
shape_to_html(Vector())


class TestLocation(DirectApiTestCase):
Expand Down

0 comments on commit 36eb3ae

Please sign in to comment.