class_docstr: Test EventBasedPathWatcher.
docstr: Test that we ignore files with same mtime.
docstr_tok: ["Test","that","we","ignore","files","with","same","mtime","."]
code: def test_callback_not_called_if_same_mtime(self):
      """Test that we ignore files with same mtime."""
      cb = mock.Mock()
  
      self.mock_util.path_modification_time = lambda *args: 101.0
      self.mock_util.calc_md5_with_blocking_retries = (
          lambda _, **kwargs: "1"
      )
  
      ro = event_based_path_watcher.EventBasedPathWatcher(
          "/this/is/my/file.py", cb
      )
  
      fo = event_based_path_watcher._MultiPathWatcher.get_singleton()
      fo._observer.schedule.assert_called_once()
  
      folder_handler = fo._observer.schedule.call_args[0][0]
  
      cb.assert_not_called()
  
      # Same mtime!
      self.mock_util.calc_md5_with_blocking_retries = (
          lambda _, **kwargs: "2"
      )
  
      ev = events.FileSystemEvent("/this/is/my/file.py")
      ev.event_type = events.EVENT_TYPE_MODIFIED
      folder_handler.on_modified(ev)
  
      # This is the test:
      cb.assert_not_called()
  
      ro.close()
  
file_path: streamlit/lib/tests/streamlit/watcher/event_based_path_watcher_test.py
imports: import unittest
  from unittest import mock
  from watchdog import events
  from streamlit.watcher import event_based_path_watcher
label_desc: Use image node_id 7 for calling the EventBasedPathWatcherTest obj's underlying member method code with example usage: obj.test_callback_not_called_if_same_mtime() without return types