Commit 4d8cee80 authored by baberabb's avatar baberabb
Browse files

added conditon to test_create_choices and minor chnages.

parent 48d861ce
...@@ -92,6 +92,7 @@ class TestNewTasks: ...@@ -92,6 +92,7 @@ class TestNewTasks:
if task.has_test_docs() if task.has_test_docs()
else list(islice(task.validation_docs(), limit)) else list(islice(task.validation_docs(), limit))
) )
if "multiple_choice" in task._config.group:
_array = [task.doc_to_choice(doc) for doc in arr] _array = [task.doc_to_choice(doc) for doc in arr]
# assert all(len(x) == 4 for x in _array) # assert all(len(x) == 4 for x in _array)
assert all(isinstance(x, list) for x in _array) assert all(isinstance(x, list) for x in _array)
......
...@@ -83,6 +83,7 @@ def test_create_choices(task_class, limit): ...@@ -83,6 +83,7 @@ def test_create_choices(task_class, limit):
if task.has_test_docs() if task.has_test_docs()
else list(islice(task.validation_docs(), limit)) else list(islice(task.validation_docs(), limit))
) )
if "multiple_choice" in task._config.group:
_array = [task.doc_to_choice(doc) for doc in arr] _array = [task.doc_to_choice(doc) for doc in arr]
# assert all(len(x) == 4 for x in _array) # assert all(len(x) == 4 for x in _array)
assert all(isinstance(x, list) for x in _array) assert all(isinstance(x, list) for x in _array)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment