Commit cf3fc29e authored by Philipp Arras's avatar Philipp Arras

Test _SlowFieldAdapter

parent c88eadc1
Pipeline #63060 failed with stages
in 5 minutes and 52 seconds
......@@ -187,9 +187,7 @@ class _SlowFieldAdapter(LinearOperator):
self._check_input(x, mode)
if isinstance(x, MultiField):
return x[self._name]
else:
return MultiField.from_dict({self._name: x},
domain=self._tgt(mode))
return MultiField.from_dict({self._name: x}, domain=self._tgt(mode))
def __repr__(self):
return '_SlowFieldAdapter'
......
......@@ -319,3 +319,10 @@ def testPartialExtractor(seed):
tgt = ift.MultiDomain.make(tgt)
op = ift.PartialExtractor(dom, tgt)
ift.extra.consistency_check(op)
@pmp('seed', [12, 3])
def testSlowFieldAdapter(seed):
dom = {'a': ift.RGSpace(1), 'b': ift.RGSpace(2)}
op = ift.operators.simple_linear_operators._SlowFieldAdapter(dom, 'a')
ift.extra.consistency_check(op)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment