Skip to content

String quiz: optional solve#3

Merged
meanmail merged 6 commits into
masterfrom
feature/string_quiz
May 4, 2017
Merged

String quiz: optional solve#3
meanmail merged 6 commits into
masterfrom
feature/string_quiz

Conversation

@meanmail
Copy link
Copy Markdown
Contributor

@meanmail meanmail commented Apr 25, 2017

Who should approve:

Solves issue(s): #EDY-2741

Description (and images):
Метод solve() теперь необязательный.

@meanmail meanmail self-assigned this Apr 25, 2017
@meanmail meanmail requested a review from psviderski April 25, 2017 09:42
Comment thread src/stepic_utils/stepicrun.py Outdated
parser.add_argument('-t', '--type', default=DATASET_QUIZ, choices=[DATASET_QUIZ, CODE_QUIZ, STRING_QUIZ])
args = parser.parse_args()

print(args.type)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debug print?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, yes

Comment thread src/stepic_utils/quiz.py
solve = lambda dataset: solve_fun()
super().__init__(module, generate, solve, check, tests)

def self_check(self):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Хорошо бы добавить тест на этот self_check. Примеры тестов можно еще в откатанном коммите глянуть: ab8c8a7

Comment thread src/stepic_utils/quiz.py Outdated
else:
check_signatures([("solve", solve_fun, 0),
("check", check_fun, 1)])
check = lambda reply, clue: check_fun(reply)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check одинаковый для обеих ветвей, можно вынести.

@psviderski
Copy link
Copy Markdown
Contributor

@meanmail Тест для проверки StringQuiz с/без solve будет?

@meanmail
Copy link
Copy Markdown
Contributor Author

meanmail commented May 4, 2017

@psviderski Да, сейчас добавлю

@meanmail
Copy link
Copy Markdown
Contributor Author

meanmail commented May 4, 2017

@psviderski добавил

@meanmail meanmail merged commit 4c51172 into master May 4, 2017
@meanmail meanmail deleted the feature/string_quiz branch May 4, 2017 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants