Skip to content

Commit

Permalink
update znflow (#540)
Browse files Browse the repository at this point in the history
  • Loading branch information
PythonFZ authored Mar 21, 2023
1 parent 16f895e commit 4d84471
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 64 deletions.
131 changes: 68 additions & 63 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ typer = "^0.7.0"

dot4dict = "^0.1.1"
zninit = "^0.1.9"
znflow = "^0.1.4"
znflow = "^0.1.5"
znjson = "^0.2.2"


Expand Down
25 changes: 25 additions & 0 deletions tests/integration/test_misc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import zntrack
import znflow


class NodeWithProperty(zntrack.Node):
params = zntrack.zn.params(None)

@property
def calc(self):
"""This should not change the params if not called."""
self.params = 42
return "calc"

def run(self):
pass


def test_NodeWithProperty(proj_path):
with zntrack.Project() as proj:
node = NodeWithProperty()

proj.run()

node.load()
assert node.params is None

0 comments on commit 4d84471

Please sign in to comment.