提交 56e4b245 authored 作者: James Bergstra's avatar James Bergstra

added some test ideas...

上级 29f197bc
...@@ -15,3 +15,71 @@ def test_whats_up_with_submembers(): ...@@ -15,3 +15,71 @@ def test_whats_up_with_submembers():
b.step(1.0) b.step(1.0)
print b.stepsize print b.stepsize
assert b.stepsize == 0.0 assert b.stepsize == 0.0
def test_no_shared_members():
"""Test that a Result cannot become a Member of two connected Modules"""
print >> sys.stderr, "WARNING MODULE TEST NOT IMPLEMENTED"
def test_members_in_list_or_dict():
"""Test that a Member which is only included via a list or dictionary is still treated as if it
were a toplevel attribute"""
print >> sys.stderr, "WARNING MODULE TEST NOT IMPLEMENTED"
def test_method_in_list_or_dict():
"""Test that a Method which is only included via a list or dictionary is still treated as if it
were a toplevel attribute"""
print >> sys.stderr, "WARNING MODULE TEST NOT IMPLEMENTED"
def test_shared_members():
"""Test that under a variety of tricky conditions, the shared-ness of Results and Members
is respected."""
print >> sys.stderr, "WARNING MODULE TEST NOT IMPLEMENTED"
#put them in subModules, sub-sub-Modules, shared between a list and a dict, shared between
#a list and a submodule with a dictionary, etc...
def test_shared_members_N():
"""Test that Members can be shared an arbitrary number of times between many submodules and
internal data structures."""
print >> sys.stderr, "WARNING MODULE TEST NOT IMPLEMENTED"
#put them in subModules, sub-sub-Modules, shared between a list and a dict, shared between
#a list and a submodule with a dictionary, etc...
def test_shared_method():
"""Test that under a variety of tricky conditions, the shared-ness of Results and Methods
is respected."""
print >> sys.stderr, "WARNING MODULE TEST NOT IMPLEMENTED"
#put them in subModules, sub-sub-Modules, shared between a list and a dict, shared between
#a list and a submodule with a dictionary, etc...
def test_shared_method_N():
"""Test that Methods can be shared an arbitrary number of times between many submodules and
internal data structures."""
#put them in subModules, sub-sub-Modules, shared between a list and a dict, shared between
#a list and a submodule with a dictionary, etc...
print >> sys.stderr, "WARNING MODULE TEST NOT IMPLEMENTED"
def test_member_method_inputs():
"""Test that module Members can be named as Method inputs, in which case the function will
*not* use the storage allocated for the Module's version of that Member."""
print >> sys.stderr, "WARNING MODULE TEST NOT IMPLEMENTED"
def test_member_input_flags():
"""Test that we can manipulate the mutable, strict, etc. flags (see SymbolicInput) of
Method inputs"""
print >> sys.stderr, "WARNING MODULE TEST NOT IMPLEMENTED"
def test_member_output_flags():
"""Test that we can manipulate the output flags (just 'borrow' I think, see SymbolicOutput)
of Method outputs"""
print >> sys.stderr, "WARNING MODULE TEST NOT IMPLEMENTED"
def test_sanity_check_mode():
"""Test that Module.make() can take the same list of Modes that function can, so we can
debug modules"""
print >> sys.stderr, "WARNING MODULE TEST NOT IMPLEMENTED"
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论