Fast Methods for Cosmological Simulations
FastSim serves as a tool for quick N-body simulations in modified gravity.
ccl_test_cclerror.py
Go to the documentation of this file.
1 from __future__ import print_function
2 from numpy.testing import run_module_suite, assert_
3 import pyccl
4 
5 
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 
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 
23 if __name__ == '__main__':
24  run_module_suite()