diff --git a/edward2/tensorflow/random_variable_test.py b/edward2/tensorflow/random_variable_test.py index 7359d5b0..d1bd8baa 100644 --- a/edward2/tensorflow/random_variable_test.py +++ b/edward2/tensorflow/random_variable_test.py @@ -103,7 +103,7 @@ def testStr(self): x = ed.RandomVariable(tfp.distributions.Normal(0.0, 1.0), value=1.234) pattern = "RandomVariable(\"1.234\", shape=(), dtype=float32" regexp = re.escape(pattern) - self.assertRegexpMatches(str(x), regexp) + self.assertRegex(str(x), regexp) def testRepr(self): x = ed.RandomVariable(tfp.distributions.Normal(0.0, 1.0), value=1.234)