コード例 #1
0
    def __createWorkout(self, fileContents):
        titleAndDate = fileContents[0]

        titleProcessor = WorkoutTitleProcessor(titleAndDate)
        exerciseProcessor = WorkoutExerciseProcessor(fileContents[1:])

        workout = Workout(titleProcessor.getTitle())
        workout.setDate(titleProcessor.getDate())

        # todo will need to separate workouts at some point #4
        workout.addAllExercises(exerciseProcessor.getAllExercises())

        return workout
コード例 #2
0
 def test_repeatedSuperDropSetWithTwoStars(self):
     wep = WorkoutExerciseProcessor(self.repeatedSuperDropSetWithTwoStars)
     self.doTestSuperDropSet(wep)
コード例 #3
0
 def test_repeatedNormalWithTwoStars(self):
     wep = WorkoutExerciseProcessor(self.repeatedNormalWithTwoStars)
     self.doTestNormal(wep)
コード例 #4
0
 def test_repeatedSuperSet(self):
     wep = WorkoutExerciseProcessor(self.repeatedSuperSet)
     self.doTestSuperSet(wep)
コード例 #5
0
 def test_repeatedDropSet(self):
     wep = WorkoutExerciseProcessor(self.repeatedDropSet)
     self.doTestDropSet(wep)
コード例 #6
0
 def test_repeatedNormal(self):
     wep = WorkoutExerciseProcessor(self.repeatedNormal)
     self.doTestNormal(wep)
コード例 #7
0
 def test_superDropSet(self):
     wep = WorkoutExerciseProcessor(self.superDropSet)
     self.doTestSuperDropSet(wep)
コード例 #8
0
 def test_dropSet(self):
     wep = WorkoutExerciseProcessor(self.dropSet)
     self.doTestDropSet(wep)
コード例 #9
0
 def test_normalSet(self):
     wep = WorkoutExerciseProcessor(self.normalSet)
     self.doTestNormal(wep)