def out_and_back_individual_time_trial(self, start, distance): itt = IndividualTimeTrial(self._date, self.stage_id(), start, start, distance, copy.deepcopy(self._cols)) self._stages.append(itt) self._increment_stage_date() self._stage_suffix = chr(ord(self._stage_suffix) + 1) self._new_state(StageBBuilder)
def individual_time_trial(self, start, finish, distance): itt = IndividualTimeTrial(self._date, self.stage_id(), start, finish, distance) self._stages.append(itt) self._increment_stage_date() self._increment_stage_number() self._new_state(ConsecutiveStageBuilder)
def individual_time_trial(self, start, finish, distance): ttt = IndividualTimeTrial(self._date, self.stage_id(), start, finish, distance) self._stages.append(ttt) self._increment_stage_date() self._increment_stage_number() self._increment_stage_suffix()
def test_dauphine_pre_2010(self): france = country.France() nancy = Location("Nancy", france) itt = IndividualTimeTrial(datetime(2009, 6, 7), "1", nancy, nancy, 12.1) dauphine = Dauphine() dauphine.add_stage(itt) assert dauphine.name == "Critérium du Dauphiné Libéré"
def tt_finish(self, stage_finish): stage = IndividualTimeTrial(self._date, self.stage_id(), self._stage_start, stage_finish, self._stage_distance, copy.deepcopy(self._cols)) self._cols.clear() self._stages.append(stage) self._increment_stage_date() self._increment_stage_number() self._increment_stage_suffix() self._new_state(ConsecutiveStageBuilder)
def summit_finish(self, col, category, km): self.add_col_to_stage(col, category, km) stage = IndividualTimeTrial(self._date, self.stage_id(), self._stage_start, col, km, copy.deepcopy(self._cols)) self._cols.clear() self._stages.append(stage) self._increment_stage_date() self._increment_stage_number() self._increment_stage_suffix() self._new_state(ConsecutiveStageBuilder)
def test_stage_description(self): france = country.France() paris = Location("Paris", france) nantes = Location("Nantes", france) limoges = Location("Limoges", france) lemans = Location("Le Mans", france) prologue = Prologue(datetime(2018, 7, 1), paris, paris, 7.8) road_stage = RoadStage(datetime(2018, 7, 2), "1", nantes, limoges, 257) team_time_trial = TeamTimeTrial(datetime(2018, 7, 3), "2", nantes, nantes, 56.8) individual_time_trial = IndividualTimeTrial(datetime(2018, 7, 4), "3", limoges, limoges, 32.4) criterium = Criterium(datetime(2018, 7, 5), "4", lemans, 234) assert prologue.description == "Individual time trial" assert road_stage.description == "Road stage" assert team_time_trial.description == "Team time trial" assert individual_time_trial.description == "Individual time trial" assert criterium.description == "Road stage"
def individual_time_trial(self, start, finish, distance): itt = IndividualTimeTrial(self._date, self.stage_id(), start, finish, distance, copy.deepcopy(self._cols)) self._stages.append(itt) self._increment_stage_number() self._new_state(AfternoonStageBuilder)