hrdcore0x1/MoodleGradeTool — pull request #5 by DragonFire168 (2014-08-28 16:38:52+00:00)
Title: inital automated testing support

Provides automated testing through '.test' files in the grading directory/.zip file.
Each .test file has its own format dependent on the Tester its designed for.
Grade.py detects these test files and asks every registered Tester if it supports them, if it does then it calls parse_config on the tester. Parse_config parses the config_file and returns a dict.

The dict is used as the dict for a new subclass for this particular test. The subclass is made and registered automatically provided the Tester inherits from the Tester class or uses TesterMeta as a metaclass. In this case the dict MUST contain a 'name' key that is used as the test's name.

The only tests provided are RegexTester and ManualTester. ManualTester is handled specially. It becomes the 'Manual' test and is always there.

RegexTester compares the output to multiple regexes. One point is gained for each match, with a maximum score of however many regexes were found in the .test file.