def create_fixture3(): ''' Creates fixture file for testing the flight in formation. ''' # ******************************************************* # Write fixture file for the BoidsMaster.match_speed_w_neighbours() fixt_boids = BoidsMaster() before_positions = deepcopy(fixt_boids.positions.tolist()) before_velocities = deepcopy(fixt_boids.velocities.tolist()) fixt_boids.match_speed_w_neighbours() fixt_boids.update_positions() after_positions = fixt_boids.positions.tolist() after_velocities = fixt_boids.velocities.tolist() beforeM3 = (before_positions, before_velocities) afterM3 = (after_positions, after_velocities) fixture = {"before": beforeM3, "after": afterM3} fixture_file = open("tests/fixtures/fixture_match_speed.yml", 'w') fixture_file.write(yaml.dump(fixture)) fixture_file.close()