Coverage for modules/org/openteacher/logic/wordListString/composerTest/composerTest : 100%
Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
|
#! /usr/bin/env python3 # -*- coding: utf-8 -*-
# Copyright 2012, Marten de Vries # # This file is part of OpenTeacher. # # OpenTeacher is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # OpenTeacher is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with OpenTeacher. If not, see <http://www.gnu.org/licenses/>.
"resources": {}, "list": { "items": input, "tests": [], } })
"resources": {}, "list": {}, })
#one blank line
[{ "id": 0, "questions": [(u"a",)], "answers": [(u"b",)], }], u"a = b\n" )
"""And of course, that type is non-JSON serializable to reproduce a bug that once happened. ;)
""" [{ "id": 0, "questions": [(u"a",)], "answers": [(u"b",)], "created": datetime.datetime.now(), }], u"a = b\n" )
[{ "id": 0, "questions": [(u"1 + 2 = 3",)], "answers": [("maths",)], }], "1 + 2 \= 3 = maths\n" )
"""Should just ignore the id like is done everywhere""" [{ "id": 34, "questions": [("a",)], "answers": [("b",)], }], "a = b\n" )
"""Should crash one way or another. Feel free to add other exceptions if your implementation requires that, as long as it throws something to alert the developer.
""" [{ "id": 0, "answers": [], }], None )
[{ "id": 0, "questions": [], }], None )
[{ "id": 0, "questions": [(u"é",)], "answers": [(u"à",)], }], u"é = à\n", )
[ {"id": 0, "questions": [("een",)], "answers": []}, {"id": 1, "questions": [], "answers": [("one",)]}, ], "een = \n = one\n" )
[ { "id": 0, "questions": [("een",)], "answers": [("one", "uno"), ("a",)] }, {"id": 1, "questions": [("twee",)], "answers": [("two",)]}, {"id": 2, "questions": [("drie",)], "answers": [("three",)]}, {"id": 3, "questions": [("vier",)], "answers": [("four",)]}, {"id": 4, "questions": [("vijf",)], "answers": [("five",)]}, { "id": 5, "questions": [("3 \= 2 + 1",)], "answers": [("three equals two plus one",)], }, ], """ een = 1. one, uno 2. a twee = two drie = three vier = four vijf = five 3 \= 2 + 1 = three equals two plus one """.strip() + "\n" )
self._mm.mods(type="wordListStringComposer"), )
|