def create_fixture_unit(): ''' Creates fixture file for a regression test for the whole clss as an unit. ''' # ******************************************************* # Write fixture file for the BoidsMaster.fly_towards_center() fixt_boids = BoidsMaster() before_positions = deepcopy(fixt_boids.positions.tolist()) before_velocities = deepcopy(fixt_boids.velocities.tolist()) fixt_boids.update_boids() after_positions = fixt_boids.positions.tolist() after_velocities = fixt_boids.velocities.tolist() before = (before_positions, before_velocities) after = (after_positions, after_velocities) fixture = {"before": before, "after": after} fixture_file = open("tests/fixtures/fixture_general.yml", 'w') fixture_file.write(yaml.dump(fixture)) fixture_file.close()