From b4840742147fd96ce6f7b3a7b5430bfcc9667a34 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Wed, 14 Oct 2015 17:20:50 +0200 Subject: Add "sandbox violated" hint for Python --- python/common.py | 1 + python/en.py | 9 +++++++-- python/sl.py | 7 ++++++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/python/common.py b/python/common.py index 2d89c19..bcd0ee3 100644 --- a/python/common.py +++ b/python/common.py @@ -16,6 +16,7 @@ hint_type = { 'error': Hint('error'), 'eof_error': Hint('eof_error'), 'timed_out': Hint('timed_out'), + 'sandbox_violation': Hint('sandbox_violation'), 'problematic_test_case': Hint('problematic_test_case'), 'no_func_name': Hint('no_func_name') } diff --git a/python/en.py b/python/en.py index 33453a9..5929a97 100644 --- a/python/en.py +++ b/python/en.py @@ -21,6 +21,9 @@ general_msg = { ''', 'timed_out':'''\ +''', + + 'sandbox_violation': '''\ ''' } @@ -61,5 +64,7 @@ hint = { 'eof_error' : [general_msg['eof_error']], - 'timed_out' : [general_msg['timed_out']] -} \ No newline at end of file + 'timed_out' : [general_msg['timed_out']], + + 'sandbox_violation': [general_msg['sandbox_violation']] +} diff --git a/python/sl.py b/python/sl.py index f9870fc..725180e 100644 --- a/python/sl.py +++ b/python/sl.py @@ -31,6 +31,9 @@ Npr., sešteti niz in število ali klicati funkcijo, čeprav tisto ni funkcija, 'timed_out':'''\

Program se izvaja predolgo.

''', + 'sandbox_violation': '''\ +

Program je izvedel nedovoljeno operacijo.

''', + 'modulo':'''\

Ostanek pri deljenju dobimo z operatorjem %.

''', @@ -83,5 +86,7 @@ pravilen rezultat: [%=testout%]

'eof_error' : [general_msg['eof_error']], - 'timed_out' : [general_msg['timed_out']] + 'timed_out' : [general_msg['timed_out']], + + 'sandbox_violation' : [general_msg['sandbox_violation']] } -- cgit v1.2.1