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_not_full_year(
            self):
        subject = Subject.half_year('CAD1')
        subject.sem2.mp1.grade = 95.02
        subject.sem2.mp2.grade = 98.49

        self.assertEqual(subject.final.unweighted, 97)
        self.assertEqual(subject.final.weighted, 48.5)
Exemplo n.º 3
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.º 4
0
from school.student import Student
from school.subject import Subject


paul = Student(name='Paul')
paul.year = 11
paul.mp = 1


CAD1 = Subject.half_year(name='CAD 1: Introduction to CADD')
Graphics1 = Subject.half_year(name='Graphics 1')
H_Algebra2 = Subject.honors(name='H Algebra 2')
H_Ancient_World_History = Subject.honors(name='H Ancient World History')
H_English9 = Subject.honors(name='H English 9')
H_Physical_Science = Subject.honors(name='H Physical Science 1')
Spanish2 = Subject.language(name='Spanish 2')
gym = Subject.half_year(name='Sports & Fitness Course 1-Boys')

subjects9 = [
    CAD1,
    Graphics1,
    H_Algebra2,
    H_Ancient_World_History,
    H_English9,
    H_Physical_Science,
    Spanish2,
    gym
]

CAD1.mp[1].grade = 99.00
CAD1.mp[2].grade = 99.00