Skip to content

Commit 8b40dd7

Browse files
committed
remove all uses of set_tag
1 parent ac48324 commit 8b40dd7

22 files changed

Lines changed: 0 additions & 28 deletions

pythonwhat/Reporter.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ def __init__(self):
2323
self.failure_msg = ""
2424
self.fallback_ast = None
2525

26-
def set_tag(self, *args, **kwargs): pass
27-
2826
def do_test(self, testobj, prepend_on_fail="", fallback_ast=None):
2927
"""Do test.
3028

pythonwhat/State.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,14 +232,12 @@ def parse_ext(x):
232232
utils_ast.mark_text_ranges(res, x + '\n')
233233

234234
except IndentationError as e:
235-
rep.set_tag("fun", "indentation_error")
236235
e.filename = "script.py"
237236
# no line info for now
238237
rep.feedback = Feedback("Your code could not be parsed due to an error in the indentation:<br>`%s.`" % str(e))
239238
rep.failed_test = True
240239

241240
except SyntaxError as e:
242-
rep.set_tag("fun", "syntax_error")
243241
e.filename = "script.py"
244242
# no line info for now
245243
rep.feedback = Feedback("Your code can not be executed due to a syntax error:<br>`%s.`" % str(e))
@@ -248,7 +246,6 @@ def parse_ext(x):
248246
# Can happen, can't catch this earlier because we can't differentiate between
249247
# TypeError in parsing or TypeError within code (at runtime).
250248
except:
251-
rep.set_tag("fun", "other_error")
252249
rep.feedback.message = "Something went wrong while parsing your code."
253250
rep.failed_test = True
254251

pythonwhat/test_funcs/test_comp.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ def test_list_comp(index=1,
2727
"""
2828

2929
rep = Reporter.active_reporter
30-
rep.set_tag("fun", "test_list_comp")
3130

3231
test_comp("list comprehension", 'list_comps', **(locals()))
3332

@@ -44,7 +43,6 @@ def test_generator_exp(index=1,
4443
"""Test generator expressions
4544
"""
4645
rep = Reporter.active_reporter
47-
rep.set_tag("fun", "test_generator_exp")
4846

4947
test_comp("generator expression", 'generator_exps', **(locals()))
5048

@@ -63,7 +61,6 @@ def test_dict_comp(index=1,
6361
"""Test dict comprehension.
6462
"""
6563
rep = Reporter.active_reporter
66-
rep.set_tag("fun", "test_dict_comp")
6764

6865
test_comp("dictionary comprehension", 'dict_comps', **(locals()))
6966

pythonwhat/test_funcs/test_correct.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ def test_correct(check, diagnose, state=None):
99
1010
"""
1111
rep = Reporter.active_reporter
12-
rep.set_tag("fun", "test_correct")
1312

1413
def diagnose_and_check(state=None):
1514
# use multi twice, since diagnose and check may be lists of tests

pythonwhat/test_funcs/test_data_frame.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ def test_data_frame(name,
2020
"""
2121

2222
rep = Reporter.active_reporter
23-
rep.set_tag("fun", "test_data_frame")
2423

2524
child = check_object(name, undefined_msg or MSG_UNDEFINED, expand_msg="", state=state, typestr="pandas DataFrame")
2625
is_instance(pd.DataFrame, not_data_frame_msg or MSG_NOT_INSTANCE, state=child) # test instance

pythonwhat/test_funcs/test_dictionary.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ def test_dictionary(name,
1818
"""
1919

2020
rep = Reporter.active_reporter
21-
rep.set_tag("fun", "test_dictionary")
2221

2322
child = check_object(name, undefined_msg or MSG_UNDEFINED, expand_msg = "", state=state, typestr="dictionary")
2423
is_instance(dict, not_dictionary_msg or MSG_NOT_INSTANCE, state=child) # test instance

pythonwhat/test_funcs/test_for_loop.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ def test_for_loop(index=1,
6262
:code:`test_exression_output()` will pass on the body code.
6363
"""
6464
rep = Reporter.active_reporter
65-
rep.set_tag("fun", "test_for_loop")
6665

6766
state = check_node('for_loops', index-1, "`for` loops", MSG_MISSING, MSG_PREPEND, state=state)
6867

pythonwhat/test_funcs/test_function.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ def test_function(name,
6565
test_function(index = 1, used = [], incorrect_result_msg = "Incorrect result") # fail
6666
"""
6767
rep = Reporter.active_reporter
68-
rep.set_tag("fun", "test_function")
6968

7069
index = index - 1
7170

@@ -259,7 +258,6 @@ def test_function_v2(name,
259258
"""
260259

261260
rep = Reporter.active_reporter
262-
rep.set_tag("fun", "test_function")
263261

264262
index = index - 1
265263
eq_map = {"equal": EqualTest}

pythonwhat/test_funcs/test_function_definition.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ def shout( word = 'help', times = 3 ):
117117
body = test_function('print', args = []]))
118118
"""
119119
rep = Reporter.active_reporter
120-
rep.set_tag("fun", "test_function_definition")
121120

122121
# what the function will be referred to as
123122
typestr = "`{}()`".format(name)

pythonwhat/test_funcs/test_if_else.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ def test_if_else(index=1,
6969
the same thing in the solution as in the student code.
7070
"""
7171
rep = Reporter.active_reporter
72-
rep.set_tag("fun", "test_if_else")
7372

7473

7574
# get state with specific if block

0 commit comments

Comments
 (0)