Ejemplo n.º 1
0
 def test_failureConstructionWithMungedStackSucceeds(self):
     """
     Pyrex and Cython are known to insert fake stack frames so as to give
     more Python-like tracebacks. These stack frames with empty code objects
     should not break extraction of the exception.
     """
     try:
         raiser.raiseException()
     except raiser.RaiserException:
         f = failure.Failure()
         self.assertTrue(f.check(raiser.RaiserException))
     else:
         self.fail("No exception raised from extension?!")
Ejemplo n.º 2
0
 def test_failureConstructionWithMungedStackSucceeds(self):
     """
     Pyrex and Cython are known to insert fake stack frames so as to give
     more Python-like tracebacks. These stack frames with empty code objects
     should not break extraction of the exception.
     """
     try:
         raiser.raiseException()
     except raiser.RaiserException:
         f = failure.Failure()
         self.assertTrue(f.check(raiser.RaiserException))
     else:
         self.fail("No exception raised from extension?!")
def get_trace(plot_type, wd, exercise_name, correct_weight):
    if plot_type == 'Max Weight':
        return wd.get_trace___max_weight(exercise_name, correct_weight)

    elif plot_type == 'Total Volume':
        return wd.get_trace___total_volume(exercise_name, correct_weight)

    elif plot_type == 'Max Reps':
        return wd.get_trace___max_reps(exercise_name, correct_weight)

    elif plot_type == 'Total Reps':
        return wd.get_trace___total_reps(exercise_name, correct_weight)

    else:
        raiseException('invalid plot_type: ', plot_type)