updates test function for new shuffle error type and message
authorKrish Ravindranath <krish.ravindranath@gmail.com>
Mon, 7 May 2018 15:43:52 +0000 (11:43 -0400)
committerKrish Ravindranath <krish.ravindranath@gmail.com>
Mon, 7 May 2018 15:43:52 +0000 (11:43 -0400)
tensorflow/python/estimator/inputs/numpy_io_test.py
tensorflow/python/estimator/inputs/pandas_io_test.py

index 92d057e..81b201c 100644 (file)
@@ -286,8 +286,9 @@ class NumpyIoTest(test.TestCase):
     x = np.arange(32, 36)
     y = np.arange(4)
     with self.test_session():
-      with self.assertRaisesRegexp(TypeError,
-                                   'shuffle must be explicitly set as boolean'):
+      with self.assertRaisesRegexp(ValueError,
+                                   'shuffle must be provided and explicitly '
+                                   'set as boolean'):
         # Default shuffle is None.
         numpy_io.numpy_input_fn(x, y)
 
index e5912a3..dcecf6d 100644 (file)
@@ -70,8 +70,9 @@ class PandasIoTest(test.TestCase):
       return
     x, _ = self.makeTestDataFrame()
     y_noindex = pd.Series(np.arange(-32, -28))
-    with self.assertRaisesRegexp(TypeError,
-                                 'shuffle must be explicitly set as boolean'):
+    with self.assertRaisesRegexp(ValueError,
+                                 'shuffle must be provided and explicitly '
+                                 'set as boolean'):
       # Default shuffle is None
       pandas_io.pandas_input_fn(x, y_noindex)