Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Neel Shah
NIFTy
Commits
c16036e2
Commit
c16036e2
authored
Jun 21, 2020
by
Philipp Arras
Browse files
Add tests for __repr__
parent
07f5cf1d
Changes
1
Hide whitespace changes
Inline
Side-by-side
test/test_operators/test_representation.py
View file @
c16036e2
...
...
@@ -214,3 +214,21 @@ def testValueInserter(sp, seed):
else
:
ind
.
append
(
int
(
ift
.
random
.
current_rng
().
integers
(
0
,
ss
-
1
)))
_check_repr
(
ift
.
ValueInserter
(
sp
,
ind
))
@
pmp
(
'dom'
,
_h_spaces
+
_p_spaces
)
def
testGaussianEnergy
(
dom
):
_check_repr
(
ift
.
GaussianEnergy
(
domain
=
dom
))
@
pmp
(
'dom'
,
_h_spaces
+
_p_spaces
)
def
testHamiltonian
(
dom
):
lh
=
ift
.
GaussianEnergy
(
domain
=
dom
)
_check_repr
(
ift
.
StandardHamiltonian
(
lh
))
@
pmp
(
'dom'
,
_h_RG_spaces
+
_p_RG_spaces
)
def
testSumOperator
(
dom
):
op0
=
ift
.
FFTOperator
(
dom
)
op1
=
op0
.
scale
(
2
)
_check_repr
(
op0
+
op1
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment