Skip to content

Commit 7185791

Browse files
ColCarrollJunpeng Lao
authored andcommitted
Fix failing test
1 parent 690d25a commit 7185791

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

pymc3/tests/test_model_helpers.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,17 +68,18 @@ def test_pandas_to_array(self):
6868
# Check function behavior with Theano graph variable
6969
theano_output = func(theano_graph_input)
7070
assert isinstance(theano_output, theano.gof.graph.Variable)
71-
assert theano_output.name == input_name
71+
assert theano_output.owner.inputs[0].name == input_name
7272

7373
# Check function behavior with generator data
7474
generator_output = func(square_generator)
75+
76+
# Output is wrapped with `pm.floatX`, and this unwraps
77+
wrapped = generator_output.owner.inputs[0]
7578
# Make sure the returned object has .set_gen and .set_default methods
76-
assert hasattr(generator_output, "set_gen")
77-
assert hasattr(generator_output, "set_default")
79+
assert hasattr(wrapped, "set_gen")
80+
assert hasattr(wrapped, "set_default")
7881
# Make sure the returned object is a Theano TensorVariable
79-
assert isinstance(generator_output, tt.TensorVariable)
80-
81-
return None
82+
assert isinstance(wrapped, tt.TensorVariable)
8283

8384
def test_as_tensor(self):
8485
"""

0 commit comments

Comments
 (0)