Skip to content

Commit

Permalink
Adding unit tests for new functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
stammler committed Jul 20, 2023
1 parent cf9c95f commit eb6ddf9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/frame/test_group.py
Expand Up @@ -51,6 +51,7 @@ def test_group_updateorder():
f.updater = ["x", "z"]
f.updater = ["y", "x"]
assert f.updateorder == ["y", "x"]
assert repr(f.updater.updater._func) == "list_updater"

def upd_x(f):
return f.x * f.y
Expand Down
10 changes: 10 additions & 0 deletions tests/frame/test_updater.py
@@ -1,10 +1,20 @@
# Tests for Updater class


from simframe.frame.frame import Frame
from simframe.frame import Updater


def test_updater_repr_str():
upd = Updater()
assert isinstance(repr(upd), str)
assert isinstance(str(upd), str)

f = Frame()

def func(f):
pass

f.updater = func
assert isinstance(repr(f.updater.updater), str)
assert isinstance(str(f.updater.updater), str)

0 comments on commit eb6ddf9

Please sign in to comment.