Set filecmp.cmp(shallow=False) in model_maker unit tests.
PiperOrigin-RevId: 498218578
This commit is contained in:
parent
175aff9be8
commit
7e36a5e2ae
|
@ -72,8 +72,10 @@ class TextClassifierTest(tf.test.TestCase):
|
||||||
self.assertTrue(os.path.exists(output_metadata_file))
|
self.assertTrue(os.path.exists(output_metadata_file))
|
||||||
self.assertGreater(os.path.getsize(output_metadata_file), 0)
|
self.assertGreater(os.path.getsize(output_metadata_file), 0)
|
||||||
self.assertTrue(
|
self.assertTrue(
|
||||||
filecmp.cmp(output_metadata_file,
|
filecmp.cmp(
|
||||||
self._AVERAGE_WORD_EMBEDDING_JSON_FILE))
|
output_metadata_file,
|
||||||
|
self._AVERAGE_WORD_EMBEDDING_JSON_FILE,
|
||||||
|
shallow=False))
|
||||||
|
|
||||||
def test_create_and_train_bert(self):
|
def test_create_and_train_bert(self):
|
||||||
train_data, validation_data = self._get_data()
|
train_data, validation_data = self._get_data()
|
||||||
|
|
|
@ -135,7 +135,9 @@ class ImageClassifierTest(tf.test.TestCase, parameterized.TestCase):
|
||||||
|
|
||||||
self.assertTrue(os.path.exists(output_metadata_file))
|
self.assertTrue(os.path.exists(output_metadata_file))
|
||||||
self.assertGreater(os.path.getsize(output_metadata_file), 0)
|
self.assertGreater(os.path.getsize(output_metadata_file), 0)
|
||||||
self.assertTrue(filecmp.cmp(output_metadata_file, expected_metadata_file))
|
self.assertTrue(
|
||||||
|
filecmp.cmp(
|
||||||
|
output_metadata_file, expected_metadata_file, shallow=False))
|
||||||
|
|
||||||
def test_continual_training_by_loading_checkpoint(self):
|
def test_continual_training_by_loading_checkpoint(self):
|
||||||
mock_stdout = io.StringIO()
|
mock_stdout = io.StringIO()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user