mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-04-29 06:46:22 +02:00
Should now test all (although upon error it stops trying to generate any more)
This commit is contained in:
parent
5c768231eb
commit
e6acaf651e
1 changed files with 4 additions and 3 deletions
|
|
@ -29,11 +29,11 @@ def checkgrads_generator(model):
|
|||
"""
|
||||
|
||||
def model_checkgrads(model):
|
||||
assert model.checkgrad() is True
|
||||
assert model.checkgrad()
|
||||
|
||||
|
||||
def model_instance(model):
|
||||
assert model.checkgrad() is True
|
||||
assert isinstance(model, GPy.core.model)
|
||||
|
||||
|
||||
def test_models():
|
||||
|
|
@ -45,7 +45,7 @@ def test_models():
|
|||
print "MODULE", module_examples
|
||||
print "Before"
|
||||
print inspect.getmembers(module_examples, predicate=inspect.isfunction)
|
||||
functions = [ func for func in inspect.getmembers(module_examples, predicate=inspect.isfunction) if func[0].startswith('_') is False ]
|
||||
functions = [ func for func in inspect.getmembers(module_examples, predicate=inspect.isfunction) if func[0].startswith('_') is False ][::-1]
|
||||
print "After"
|
||||
print functions
|
||||
for example in functions:
|
||||
|
|
@ -72,3 +72,4 @@ def test_models():
|
|||
|
||||
if __name__ == "__main__":
|
||||
print "Running unit tests, please be (very) patient..."
|
||||
unittest.main()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue