# Path: athlib/tyrving_score.py
# def tyrving_score(gender: str, age: int, event_code: str, perf: Union[int, float, str]) -> int:
#     timing_kind='automatic'
#     if PAT_RUN.match(event_code):
#         if is_hand_timing(perf):
#             timing_kind = 'manual'
# 
#     event_code = normalize_event_code(event_code)
#     gender = normalize_gender(gender)
#     params = _tyrvingTables.get(gender,None)
#     if params is None:
#         raise ValueError('Cannot get a Tyrving table for gender=%r' % gender)
#     params = params.get(event_code,None)
#     if not params:
#         raise ValueError('Cannot get a Tyrving calculation for gender=%r event_code=%r' % (gender, event_code))
#     return TyrvingCalculator(gender, event_code, params[0], params[1]).points(age, perf, timing_kind=timing_kind)


from unittest import TestCase, main
from athlib import tyrving_score
                ('M', 12, 'SP3Kg', '5.00', 379),
                ('M', 12, 'SP3Kg', '10.0', 922),
                ('M', 12, 'SP3Kg', '16', 1141),
                ('M', 12, 'HJ', '1.5', 1000),
                ('M', 12, 'HJ', '1.6', 1070),
                ('M', 14, 'HJ', '1.5', 846),
                ('M', 14, 'SHJ', '1.6', 1195),
                ('F', 15, '100', '12.50', 1064),

                ('F', 15, '100', '13.24', 945),
                ('F', 15, '100', '13.0', 945),
                ('F', 15, '100', '13', 945),

                ('F', 15, '1000W', '300.00', 825),
                ('F', 15, '200h76.2cm19m', '30.00', 1050),
                ('F', 15, '1500SC', '311.80', 1083),
                ('F', 15, 'JT500', 30, 790),
                ('F', 10, 'BT1K', 10, 600),
                ('F', 10, 'BT1K', 20, 1000),
                ('F', 10, 'BT1K', 30, 1130),
                ('F', 11, 'BT1K', 18, 730),
                ('F', 11, 'BT1K', 24, 950),
                ('F', 11, 'BT1K', 30, 1052),
                ('F', 12, 'BT1K', 20, 605),
                ('F', 12, 'BT1K', 30.1, 977),
                ('F', 12, 'BT1K', 39.8, 1114),
                ]:
            self.assertEqual(tyrving_score(gender, age, event, performance), expected,
                    "tyrving_score(%r, %r, %r, %r) returned %r not the expected %r" %(
                        gender, age, event, performance,

# Path: athlib/tyrving_score.py
# def tyrving_score(gender: str, age: int, event_code: str, perf: Union[int, float, str]) -> int:
#     timing_kind='automatic'
#     if PAT_RUN.match(event_code):
#         if is_hand_timing(perf):
#             timing_kind = 'manual'
# 
#     event_code = normalize_event_code(event_code)
#     gender = normalize_gender(gender)
#     params = _tyrvingTables.get(gender,None)
#     if params is None:
#         raise ValueError('Cannot get a Tyrving table for gender=%r' % gender)
#     params = params.get(event_code,None)
#     if not params:
#         raise ValueError('Cannot get a Tyrving calculation for gender=%r event_code=%r' % (gender, event_code))
#     return TyrvingCalculator(gender, event_code, params[0], params[1]).points(age, perf, timing_kind=timing_kind)


# Path: tests/test_tyrving_score.py
from unittest import TestCase, main
from athlib import tyrving_score

                ('M', 12, 'SP3Kg', '5.00', 379),
                ('M', 12, 'SP3Kg', '10.0', 922),
                ('M', 12, 'SP3Kg', '16', 1141),
                ('M', 12, 'HJ', '1.5', 1000),
                ('M', 12, 'HJ', '1.6', 1070),
                ('M', 14, 'HJ', '1.5', 846),
                ('M', 14, 'SHJ', '1.6', 1195),
                ('F', 15, '100', '12.50', 1064),

                ('F', 15, '100', '13.24', 945),
                ('F', 15, '100', '13.0', 945),
                ('F', 15, '100', '13', 945),

                ('F', 15, '1000W', '300.00', 825),
                ('F', 15, '200h76.2cm19m', '30.00', 1050),
                ('F', 15, '1500SC', '311.80', 1083),
                ('F', 15, 'JT500', 30, 790),
                ('F', 10, 'BT1K', 10, 600),
                ('F', 10, 'BT1K', 20, 1000),
                ('F', 10, 'BT1K', 30, 1130),
                ('F', 11, 'BT1K', 18, 730),
                ('F', 11, 'BT1K', 24, 950),
                ('F', 11, 'BT1K', 30, 1052),
                ('F', 12, 'BT1K', 20, 605),
                ('F', 12, 'BT1K', 30.1, 977),
                ('F', 12, 'BT1K', 39.8, 1114),
                ]:
            self.assertEqual(tyrving_score(gender, age, event, performance), expected,
                    "tyrving_score(%r, %r, %r, %r) returned %r not the expected %r" %(
                        gender, age, event, performance,

                        tyrving_score(gender, age, event, performance), expected,