Skip to content
Snippets Groups Projects
report3.py 911 B
Newer Older
  • Learn to ignore specific revisions
  • tuhe's avatar
    tuhe committed
    """
    Example student code. This file is automatically generated from the files in the instructor-directory
    """
    
    tuhe's avatar
    tuhe committed
    from src.unitgrade2.unitgrade2 import UTestCase, Report
    from src.unitgrade2 import evaluate_report_student
    
    tuhe's avatar
    tuhe committed
    
    class Week1(UTestCase):
        """ The first question for week 1. """
        def test_add(self):
    
    tuhe's avatar
    tuhe committed
            from cs103.homework1 import add
    
    tuhe's avatar
    tuhe committed
            self.assertEqualC(add(2,2))
            self.assertEqualC(add(-100, 5))
    
    
    
    tuhe's avatar
    tuhe committed
    class AutomaticPass(UTestCase):
        def test_student_passed(self):
            self.assertEqual(2,2)
    
    
    
    tuhe's avatar
    tuhe committed
    import cs103
    class Report3(Report):
        title = "CS 101 Report 3"
    
    tuhe's avatar
    tuhe committed
        questions = [(Week1, 20), (AutomaticPass, 10)]  # Include a single question for 10 credits.
    
    tuhe's avatar
    tuhe committed
        pack_imports = [cs103]
    
    if __name__ == "__main__":
    
    tuhe's avatar
    tuhe committed
        # from unitgrade_private2.hidden_gather_upload import gather_upload_to_campusnet
        # gather_upload_to_campusnet(Report3())
    
    tuhe's avatar
    tuhe committed
        evaluate_report_student(Report3())