def setUp(self):
        python = Subject.half_year(name='Intro to Python')
        history = Subject.advanced_placement(name='AP Modern World History')
        english = Subject.honors(name='H English')
        science = Subject.college_prep(name='CP Biology')
        math = Subject.honors(name='H Geometry')
        spanish = Subject.language(name='Spanish 3')

        python.sem1.mp1.grade = 98.07
        python.sem1.mp2.grade = 99.42
        history.sem1.mp1.grade = 93.71
        history.sem1.mp2.grade = 89.29
        history.sem1.exam = 76
        english.sem1.mp1.grade = 92.30
        english.sem1.mp2.grade = 96.85
        science.sem1.mp1.grade = 95.04
        science.sem1.mp2.grade = 94.95
        math.sem1.mp1.grade = 97.34
        math.sem1.mp2.grade = 99.49
        spanish.sem1.mp1.grade = 91.72
        spanish.sem1.mp2.grade = 91.80

        self.subjects = [python, history, english, science, math, spanish]

        self.year = Year(year=9)
        self.year.extend_subjects(subjects=self.subjects)
Exemplo n.º 2
0
    def test_has_public_property_which_calculates_final_grade_when_subject_is_full_year(
            self):
        subject = Subject.advanced_placement('AP Chemistry')
        subject.sem1.mp1.grade = 97.52
        subject.sem1.mp2.grade = 93.83
        subject.sem1.exam = 89
        subject.sem2.mp1.grade = 95.29
        subject.sem2.mp2.grade = 87.02
        subject.sem2.exam = 92

        self.assertEqual(subject.final.unweighted, 93)
        self.assertEqual(subject.final.weighted, 102.3)
Exemplo n.º 3
0
    def test_has_class_methods_for_determining_subject_type_and_weight(self):
        subject = Subject.advanced_placement(name='AP Modern World History')

        self.assertEqual(subject._full_year, True)
        self.assertEqual(subject._weight, 1.100)
Exemplo n.º 4
0
    def test_figures_out_credit_from_subject_type(self):
        subject = Subject.advanced_placement(name='AP Modern World History')
        elective = Subject.half_year(name='Intro to Python')

        self.assertEqual(subject.credit, 1.00)
        self.assertEqual(elective.credit, 0.50)
Exemplo n.º 5
0
H_Physical_Science.mp[4].grade = 92.00
H_Physical_Science.sem2.exam = 99

Spanish2.mp[1].grade = 93.00
Spanish2.mp[2].grade = 94.00
Spanish2.mp[3].grade = 93.00
Spanish2.mp[4].grade = 95.00

gym.mp[3].grade = 99.00
gym.mp[4].grade = 94.00





AP_World_History = Subject.advanced_placement(name='AP World History')
CADD2 = Subject.half_year(name='CADD 2')
H_Biology = Subject.honors(name='H Biology')
H_Computer_Programming = Subject.half_year_honors(name='H Computer Programming')
H_Enlgish10 = Subject.honors(name='H English 10')
H_Geometry = Subject.honors(name='H Geometry')
Python = Subject.half_year(name='Intro to Python')
Spanish3 = Subject.language(name='Spanish 3')
TAG = Subject.half_year(name='Team Aerobic Games')

subjects10 = [
    AP_World_History,
    CADD2,
    H_Biology,
    H_Computer_Programming,
    H_Enlgish10,