def testReadTaskUidFromLockFile(self): module_dir = os.path.join(self.get_temp_dir(), "module") task_uid = uuid.uuid4().hex lock_filename = resolver._lock_filename(module_dir) tf_utils.atomic_write_string_to_file( lock_filename, resolver._lock_file_contents(task_uid), overwrite=False) self.assertEqual(task_uid, resolver._task_uid_from_lock_file(lock_filename))
def testReadTaskUidFromLockFile(self): module_dir = os.path.join(self.get_temp_dir(), "module") task_uid = uuid.uuid4().hex lock_filename = resolver._lock_filename(module_dir) tf_utils.atomic_write_string_to_file(lock_filename, resolver._lock_file_contents(task_uid), overwrite=False) self.assertEqual(task_uid, resolver._task_uid_from_lock_file(lock_filename))