The second test fails if the student uses the word "from" anywhere in their code, such as a pattern.
Minimal failing example:
import re
import sys
"""from now on, we will work 9 to 5!"""
"""imports must be normal"""
Either of the last two lines will fail the test. This bug was revealed when a student used named capture groups in their regular expression and named one "from".
This happens due to the import checking pattern, which can be fixed by adding some extra sanity checks for the statement being at the start of the line.
The second test fails if the student uses the word "from" anywhere in their code, such as a pattern.
Minimal failing example:
Either of the last two lines will fail the test. This bug was revealed when a student used named capture groups in their regular expression and named one "from".
This happens due to the import checking pattern, which can be fixed by adding some extra sanity checks for the statement being at the start of the line.