Fix pep8 issues caused by the fixer.
This commit is contained in:
@@ -481,13 +481,13 @@ class FormulaResponseTest(ResponseTest):
|
||||
input_dict = {'1_2_1': "x + 2*y + y"}
|
||||
correct_map = problem.grade_answers(input_dict)
|
||||
self.assertEqual(correct_map.get_hint('1_2_1'),
|
||||
'Check the coefficient of y')
|
||||
'Check the coefficient of y')
|
||||
|
||||
# Expect to receive a hint if we leave out x
|
||||
input_dict = {'1_2_1': "2*y"}
|
||||
correct_map = problem.grade_answers(input_dict)
|
||||
self.assertEqual(correct_map.get_hint('1_2_1'),
|
||||
'Try including the variable x')
|
||||
'Try including the variable x')
|
||||
|
||||
def test_script(self):
|
||||
"""
|
||||
@@ -819,13 +819,13 @@ class StringResponseTest(ResponseTest): # pylint: disable=missing-docstring
|
||||
input_dict = {'1_2_1': 'Wisconsin'}
|
||||
correct_map = problem.grade_answers(input_dict)
|
||||
self.assertEqual(correct_map.get_hint('1_2_1'),
|
||||
"The state capital of Wisconsin is Madison")
|
||||
"The state capital of Wisconsin is Madison")
|
||||
|
||||
# We should get a hint for Minnesota
|
||||
input_dict = {'1_2_1': 'Minnesota'}
|
||||
correct_map = problem.grade_answers(input_dict)
|
||||
self.assertEqual(correct_map.get_hint('1_2_1'),
|
||||
"The state capital of Minnesota is St. Paul")
|
||||
"The state capital of Minnesota is St. Paul")
|
||||
|
||||
# We should NOT get a hint for Michigan (the correct answer)
|
||||
input_dict = {'1_2_1': 'Michigan'}
|
||||
@@ -868,13 +868,13 @@ class StringResponseTest(ResponseTest): # pylint: disable=missing-docstring
|
||||
input_dict = {'1_2_1': 'Wisconsin'}
|
||||
correct_map = problem.grade_answers(input_dict)
|
||||
self.assertEqual(correct_map.get_hint('1_2_1'),
|
||||
"The state capital of Wisconsin is Madison")
|
||||
"The state capital of Wisconsin is Madison")
|
||||
|
||||
# We should get a hint for Minnesota
|
||||
input_dict = {'1_2_1': 'Minnesota'}
|
||||
correct_map = problem.grade_answers(input_dict)
|
||||
self.assertEqual(correct_map.get_hint('1_2_1'),
|
||||
"The state capital of Minnesota is St. Paul")
|
||||
"The state capital of Minnesota is St. Paul")
|
||||
|
||||
# We should NOT get a hint for Michigan (the correct answer)
|
||||
input_dict = {'1_2_1': 'Michigan'}
|
||||
|
||||
@@ -279,7 +279,7 @@ class CapaShuffleTest(unittest.TestCase):
|
||||
html = orig_html.replace('\n', ' ') # avoid headaches with .* matching
|
||||
print(html)
|
||||
self.assertRegex(html, r"<div>.*\[.*'Banana'.*'Apple'.*'Chocolate'.*'Donut'.*\].*</div>.*" +
|
||||
r"<div>.*\[.*'C'.*'A'.*'D'.*'B'.*\].*</div>")
|
||||
r"<div>.*\[.*'C'.*'A'.*'D'.*'B'.*\].*</div>")
|
||||
# Look at the responses in their authored order
|
||||
responses = sorted(list(problem.responders.values()), key=lambda resp: int(resp.id[resp.id.rindex('_') + 1:]))
|
||||
self.assertFalse(responses[0].has_mask())
|
||||
|
||||
@@ -130,7 +130,7 @@ class CapaTargetedFeedbackTest(unittest.TestCase):
|
||||
without_new_lines = the_html.replace("\\n", "").replace("\n", "")
|
||||
# pylint: disable=line-too-long
|
||||
self.assertRegex(without_new_lines,
|
||||
r"<targetedfeedback explanation-id=\"feedbackC\" role=\"group\" aria-describedby=\"1_2_1-legend\">\s*<span class=\"sr\">Correct</span>.*Feedback on your correct solution...")
|
||||
r"<targetedfeedback explanation-id=\"feedbackC\" role=\"group\" aria-describedby=\"1_2_1-legend\">\s*<span class=\"sr\">Correct</span>.*Feedback on your correct solution...")
|
||||
self.assertNotRegexpMatches(without_new_lines, r"feedback1|feedback2|feedback3")
|
||||
|
||||
def test_targeted_feedback_id_typos(self):
|
||||
|
||||
Reference in New Issue
Block a user