Fast Methods for Cosmological Simulations
FastSim serves as a tool for quick N-body simulations in modified gravity.
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
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
6
def
test_cclerror_repr
():
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
14
def
test_cclerror_not_equal
():
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()
ccl_test_cclerror.test_cclerror_not_equal
def test_cclerror_not_equal()
Definition:
ccl_test_cclerror.py:14
ccl_test_cclerror.test_cclerror_repr
def test_cclerror_repr()
Definition:
ccl_test_cclerror.py:6
src
3party
CCL
tests
ccl_test_cclerror.py
Generated by
1.8.11