From 48064efcfd4c402b8b7736b019fd340534df6aa1 Mon Sep 17 00:00:00 2001 From: Rick Chao Date: Mon, 22 Jun 2020 21:41:24 -0700 Subject: [PATCH] Skip data loading error in multi_worker_tutorial_test (the test does not aim to cover this). PiperOrigin-RevId: 317797271 Change-Id: I8336d7ffeda0836beef0a2d04e633614a44e7fa4 --- .../python/keras/distribute/multi_worker_tutorial_test.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tensorflow/python/keras/distribute/multi_worker_tutorial_test.py b/tensorflow/python/keras/distribute/multi_worker_tutorial_test.py index 3f9ab18f89c..aafa00bcc9f 100644 --- a/tensorflow/python/keras/distribute/multi_worker_tutorial_test.py +++ b/tensorflow/python/keras/distribute/multi_worker_tutorial_test.py @@ -19,6 +19,7 @@ from __future__ import print_function import contextlib import os import re +import zipfile from absl.testing import parameterized import numpy as np from tensorflow.python import keras @@ -43,6 +44,8 @@ class MultiWorkerTutorialTest(parameterized.TestCase, test.TestCase): def skip_fetch_failure_exception(self): try: yield + except zipfile.BadZipfile as e: + self.skipTest('Data loading error: Bad magic number for file header.') except Exception as e: # pylint: disable=broad-except if 'URL fetch failure' in str(e): self.skipTest('URL fetch error not considered failure of the test.')