Skip to content

Commit

Permalink
Increase test coverage in saving
Browse files Browse the repository at this point in the history
  • Loading branch information
Faisal-Alsrheed committed Sep 16, 2023
1 parent e0a76fa commit 4f51acf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion keras_core/saving/saving_api_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from keras_core import layers
from keras_core.models import Sequential
from keras_core.saving import saving_api
from keras_core.utils import io_utils


class SaveModelTests(unittest.TestCase):
Expand Down Expand Up @@ -34,7 +35,7 @@ def test_invalid_save_format(self):

def test_overwrite_prompt(self):
original_mtime = os.path.getmtime(self.filepath)
saving_api.io_utils.ask_to_proceed_with_overwrite = lambda x: False
io_utils.ask_to_proceed_with_overwrite = lambda x: False
saving_api.save_model(self.model, self.filepath, overwrite=False)
new_mtime = os.path.getmtime(self.filepath)
self.assertEqual(original_mtime, new_mtime)
Expand Down

0 comments on commit 4f51acf

Please sign in to comment.