--- theano/tensor/tests/test_basic.py.orig 2019-01-15 14:13:57.000000000 -0700
+++ theano/tensor/tests/test_basic.py 2019-08-15 09:02:44.459403923 -0600
@@ -344,93 +344,6 @@ def makeTester(name, op, expected, check
os.close(f)
os.remove(fname)
- def test_good(self):
- if skip:
- raise SkipTest(skip)
-
- good = self.add_memmap_values(self.good)
-
- for testname, inputs in iteritems(good):
- inputs = [copy(input) for input in inputs]
- inputrs = [TensorType(
- dtype=input.dtype,
- broadcastable=[shape_elem == 1
- for shape_elem in input.shape]
- )() for input in inputs]
- try:
- node = safe_make_node(self.op, *inputrs)
- except Exception as exc:
- err_msg = ("Test %s::%s: Error occurred while"
- " making a node with inputs %s") % (
- self.op, testname, inputs)
- exc.args += (err_msg,)
- raise
-
- try:
- f = inplace_func(inputrs, node.outputs, mode=mode, name='test_good')
- except Exception as exc:
- err_msg = ("Test %s::%s: Error occurred while"
- " trying to make a Function") % (self.op, testname)
- exc.args += (err_msg,)
- raise
- if (isinstance(self.expected, dict) and
- testname in self.expected):
- expecteds = self.expected[testname]
- # with numpy version, when we print a number and read it
- # back, we don't get exactly the same result, so we accept
- # rounding error in that case.
- eps = 5e-9
- else:
- expecteds = self.expected(*inputs)
- eps = 1e-10
-
- if any([i.dtype in ('float32', 'int8', 'uint8', 'uint16')
- for i in inputs]):
- eps = 1e-6
- eps = np.max([eps, _eps])
-
- try:
- variables = f(*inputs)
- except Exception as exc:
- err_msg = ("Test %s::%s: Error occurred while calling"
- " the Function on the inputs %s") % (
- self.op, testname, inputs)
- exc.args += (err_msg,)
- raise
-
- if not isinstance(expecteds, (list, tuple)):
- expecteds = (expecteds, )
-
- for i, (variable, expected) in enumerate(
- izip(variables, expecteds)):
- if (variable.dtype != expected.dtype or
- variable.shape != expected.shape or
- not np.allclose(variable, expected,
- atol=eps, rtol=eps)):
- self.fail(("Test %s::%s: Output %s gave the wrong"
- " value. With inputs %s, expected %s (dtype %s),"
- " got %s (dtype %s). eps=%f"
- " np.allclose returns %s %s") % (
- self.op,
- testname,
- i,
- inputs,
- expected,
- expected.dtype,
- variable,
- variable.dtype,
- eps,
- np.allclose(variable, expected,
- atol=eps, rtol=eps),
- np.allclose(variable, expected)))
-
- for description, check in iteritems(self.checks):
- if not check(inputs, variables):
- self.fail(("Test %s::%s: Failed check: %s (inputs"
- " were %s, outputs were %s)") % (
- self.op, testname, description,
- inputs, variables))
-
def test_bad_build(self):
if skip:
raise SkipTest(skip)