- Timestamp:
- 11/20/12 09:30:43 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/decorate/test_wrapper.py
r591 r593 17 17 def test_nested_constraint(): 18 18 19 from mystic.math import impose_mean19 from mystic.math.measures import impose_mean 20 20 21 21 @nested(inner=impose_mean) … … 30 30 def test_nested_constraints(): 31 31 32 from mystic.math import impose_mean, impose_spread32 from mystic.math.measures import impose_mean, impose_spread 33 33 34 34 def impose_constraints(x, mean=0.0, spread=1.0): … … 77 77 n,y = squared(x, 1) 78 78 assert n[0] == 13 79 assert y == x**2 + 179 assert all(y == x**2 + 1) 80 80 81 81 … … 101 101 def test_bounded(): 102 102 103 @bounded(min=1,max=10 )103 @bounded(min=1,max=10-1e-8) 104 104 def squared(x): 105 105 return x**2 … … 141 141 142 142 143 if __name__ is'__main__':143 if __name__ == '__main__': 144 144 test_nested() 145 145 test_nested_constraint()
Note: See TracChangeset
for help on using the changeset viewer.