def show_block(problem): return { 'status_description': TodoGenerator.get_status_description(problem.path), 'tests_count': TodoGenerator.generated_tests_count(problem.path), 'samples_present': TodoGenerator.sample_tests_count(problem.path) > 0, }
def test_empty_solution(self): ITEMS = ( "statement", "checker", "description", "analysis", "validator", "main_solution", "tags", "name", "tests_description", ) TRANSITION = dict(map(lambda item: (item, "warning"), ITEMS)) TodoGenerator._TodoGenerator__get_file_item_status = lambda config, md5_values, item, path=None, root_path=None: TRANSITION[ item ] TodoGenerator._TodoGenerator__get_simple_item_status = lambda config, item: TRANSITION[item] self.assertDictEqual( dict(TodoGenerator.get_status_description()), { "statement": "default", "checker": "default", "description": "default", "analysis": "default", "validator": "default", "main_solution": "default", "tags": "empty", "name": "empty", "tests description": "default", }, )
def test_empty_solution(self): ITEMS = ('statement', 'checker', 'description', 'analysis', 'validator', 'main_solution', 'tags', 'name', 'tests_description') TRANSITION = dict(map(lambda item: (item, 'warning'), ITEMS)) TodoGenerator._TodoGenerator__get_file_item_status = lambda config, md5_values, item, path=None, root_path=None: TRANSITION[ item] TodoGenerator._TodoGenerator__get_simple_item_status = lambda config, item: TRANSITION[ item] self.assertDictEqual( dict(TodoGenerator.get_status_description()), { 'statement': 'default', 'checker': 'default', 'description': 'default', 'analysis': 'default', 'validator': 'default', 'main_solution': 'default', 'tags': 'empty', 'name': 'empty', 'tests description': 'default', })