Updating regex in test case to a more stable one with inline dotall flag.

PiperOrigin-RevId: 264728568
This commit is contained in:
Pavithra Vijay 2019-08-21 17:18:19 -07:00 committed by TensorFlower Gardener
parent f671dfffa9
commit 6fd82802c1

View File

@ -310,10 +310,8 @@ class KerasCallbacksTest(keras_parameterized.TestCase):
x = np.ones((100, 3))
y = np.zeros((100, 2))
expected_log = (
r'.*1/2\n'
r'.*80/80.*- loss:.*- my_acc:.*- val_loss:.*- val_my_acc:.*\n'
r'.*2/2\n'
r'.*80/80.*- loss:.*- my_acc:.*- val_loss:.*- val_my_acc:.*')
r'(?s).*1/2.*80/80.*- loss:.*- my_acc:.*- val_loss:.*- val_my_acc:'
r'.*2/2.*80/80.*- loss:.*- my_acc:.*- val_loss:.*- val_my_acc:.*')
with self.captureWritesToStream(sys.stdout) as printed:
model.fit(x, y, batch_size=10, epochs=2, validation_split=0.2)