Skip to content

Commit 0f73cf0

Browse files
amadolidypkang
authored andcommitted
[HOTFIX]: Architype not updating
1 parent f1566c3 commit 0f73cf0

File tree

2 files changed

+24
-5
lines changed

2 files changed

+24
-5
lines changed

jac/jaclang/plugin/tests/test_jaseci.py

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -337,8 +337,8 @@ def trigger_access_validation_test(
337337

338338
# --------- NO UPDATE SHOULD HAPPEN -------- #
339339

340-
self.assertTrue(archs[0], "A(val=2)")
341-
self.assertTrue(archs[1], "A(val=1)")
340+
self.assertEqual(archs[0], "A(val=2)")
341+
self.assertEqual(archs[1], "A(val=1)")
342342

343343
self._output2buffer()
344344
cli.enter(
@@ -435,8 +435,8 @@ def trigger_access_validation_test(
435435

436436
# --------- UPDATE SHOULD HAPPEN -------- #
437437

438-
self.assertTrue(archs[0], "A(val=20)")
439-
self.assertTrue(archs[1], "A(val=10)")
438+
self.assertEqual(archs[0], "A(val=20)")
439+
self.assertEqual(archs[1], "A(val=10)")
440440

441441
self._output2buffer()
442442
cli.enter(
@@ -474,6 +474,25 @@ def trigger_access_validation_test(
474474
)
475475
self.assertFalse(self.capturedOutput.getvalue().strip())
476476

477+
# --------- ROOTS RESET OWN NODE -------- #
478+
479+
cli.enter(
480+
filename=self.fixture_abs_path("other_root_access.jac"),
481+
entrypoint="update_node",
482+
args=[1],
483+
session=session,
484+
root=self.roots[0],
485+
node=self.nodes[0],
486+
)
487+
cli.enter(
488+
filename=self.fixture_abs_path("other_root_access.jac"),
489+
entrypoint="update_node",
490+
args=[2],
491+
session=session,
492+
root=self.roots[1],
493+
node=self.nodes[1],
494+
)
495+
477496
def test_other_root_access(self) -> None:
478497
"""Test filtering on node, then visit."""
479498
global session

jac/jaclang/runtimelib/memory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def close(self) -> None:
106106
if root.has_write_access(d):
107107
if hash(dumps(p_d.access)) != hash(dumps(d.access)):
108108
p_d.access = d.access
109-
if hash(dumps(d.architype)) != hash(dumps(d.architype)):
109+
if hash(dumps(p_d.architype)) != hash(dumps(d.architype)):
110110
p_d.architype = d.architype
111111

112112
self.__shelf__[_id] = p_d

0 commit comments

Comments
 (0)