Skip to content

Commit

Permalink
fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Krande committed Oct 23, 2024
1 parent 24feb09 commit 38cdf52
Showing 1 changed file with 13 additions and 18 deletions.
31 changes: 13 additions & 18 deletions tests/core/visit/test_graph_store.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import ada
from ada.visit.renderer_manager import scene_from_fem, RenderParams


def test_basic_graph():
Expand All @@ -16,13 +15,13 @@ def test_basic_graph():
assert len(draw_ranges_n0) == 2
assert len(id_hierarchy) == 4

assert draw_ranges_n0[2] == (0, 132)
assert draw_ranges_n0[3] == (132, 132)
assert draw_ranges_n0["2"] == (0, 132)
assert draw_ranges_n0["3"] == (132, 132)

assert id_hierarchy[0] == ('Ada', '*')
assert id_hierarchy[1] == ('MyPart', 0)
assert id_hierarchy[2] == ('bm1', 1)
assert id_hierarchy[3] == ('bm2', 1)
assert id_hierarchy["0"] == ('Ada', '*')
assert id_hierarchy["1"] == ('MyPart', "0")
assert id_hierarchy["2"] == ('bm1', "1")
assert id_hierarchy["3"] == ('bm2', "1")


def test_basic_graph_multi_color():
Expand All @@ -44,17 +43,13 @@ def test_basic_graph_multi_color():
id_hierarchy = meta["id_hierarchy"]
assert len(id_hierarchy) == 4

assert draw_ranges_n0[2] == (0, 132)
assert draw_ranges_n1[3] == (0, 132)
assert draw_ranges_n0["2"] == (0, 132)
assert draw_ranges_n1["3"] == (0, 132)

assert id_hierarchy["0"] == ('Ada', '*')
assert id_hierarchy["1"] == ('MyPart', "0")
assert id_hierarchy["2"] == ('bm1', "1")
assert id_hierarchy["3"] == ('bm2', "1")

assert id_hierarchy[0] == ('Ada', '*')
assert id_hierarchy[1] == ('MyPart', 0)
assert id_hierarchy[2] == ('bm1', 1)
assert id_hierarchy[3] == ('bm2', 1)


def test_fea_graph(bm_line_fem):
fem = bm_line_fem.fem
params = RenderParams()
scene = scene_from_fem(fem, params)
meta = scene.metadata

0 comments on commit 38cdf52

Please sign in to comment.