Fast Methods for Cosmological Simulations
FastSim serves as a tool for quick N-body simulations in modified gravity.
ccl_test_cclerror Namespace Reference

Functions

def test_cclerror_repr ()
 
def test_cclerror_not_equal ()
 

Function Documentation

def ccl_test_cclerror.test_cclerror_not_equal ( )
Check that a CCLError can be built from its repr

Definition at line 14 of file ccl_test_cclerror.py.

15  """Check that a CCLError can be built from its repr"""
16  e = pyccl.CCLError("blah")
17  e2 = pyccl.CCLError("blahh")
18  assert_(e is not e2)
19  assert_(e != e2)
20  assert_(hash(e) != hash(e2))
21 
22 
def ccl_test_cclerror.test_cclerror_repr ( )
Check that a CCLError can be built from its repr

Definition at line 6 of file ccl_test_cclerror.py.

7  """Check that a CCLError can be built from its repr"""
8  e = pyccl.CCLError("blah")
9  e2 = eval(repr(e))
10  assert_(str(e2) == str(e))
11  assert_(e2 == e)
12 
13