Skip to content
Snippets Groups Projects
Commit 43296f1f authored by Paul McCarthy's avatar Paul McCarthy :mountain_bicyclist:
Browse files

TEST: Unit tests for skipUnchanged.invalidate

parent e74271e1
No related branches found
No related tags found
No related merge requests found
......@@ -242,7 +242,29 @@ def test_skipUnchanged():
wrapped('key4', np.zeros((1, 4)))
assert timesCalled['key4'] == 2
timesCalled['key1'] = 0
timesCalled['key2'] = 0
timesCalled['key3'] = 0
wrapped('key1', 1)
wrapped('key2', 2)
wrapped('key3', 3)
assert timesCalled['key1'] == 1
assert timesCalled['key2'] == 1
assert timesCalled['key3'] == 1
wrapped('key1', 1)
wrapped('key2', 2)
wrapped('key3', 3)
assert timesCalled['key1'] == 1
assert timesCalled['key2'] == 1
assert timesCalled['key3'] == 1
wrapped.invalidate()
wrapped('key1', 1)
wrapped('key2', 2)
wrapped('key3', 3)
assert timesCalled['key1'] == 2
assert timesCalled['key2'] == 2
assert timesCalled['key3'] == 2
def test_Instanceify():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment