def test_multiple_serverset_changes(self):
        fd, tmp_file = tempfile.mkstemp()

        test_data = [0, None]

        def on_change(value):
            test_data[0] += 1
            test_data[1] = value

        new_content = "hello"
        watch = FileWatch(polling=False)
        watch._clear_all_watches()
        self._validate_empty_internal_map(watch)
        watch.add_watch(tmp_file, on_change, watch_type='serverset')
        self._validate_internal_map(watch, tmp_file, 'serverset', 1)
        times = 3
        expected_content = []
        isFirst = True
        for i in range(times):
            time.sleep(1)
            new_line = new_content + str(i)
            f = open(tmp_file, 'a')
            if isFirst:
                isFirst = False
            else:
                f.write("\n")
            f.write(new_line)
            f.close()
            watch._check_file_updates()
            self._validate_internal_map(watch, tmp_file, 'serverset', 1)
            expected_content.append(new_line)
            self.assertEqual(test_data[0], i+2)
            self.assertEqual(test_data[1], expected_content)
        del watch
        os.remove(tmp_file)
Computes the speed at the specified point index.
dataset/ETHPy150Open pinterest/kingpin/kingpin/tests/kazoo_utils/test_file_watch.py/FileWatchTestCase.test_multiple_serverset_changes--crossover with--dataset/ETHPy150Open tkrajina/gpxpy/gpxpy/gpx.py/GPXTrackSegment.get_speed