Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
9f2bce00
Commit
9f2bce00
authored
12 years ago
by
David Ormsbee
Committed by
Calen Pennington
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Catch common case where problem answers are specified with units but don't expect them in the input
parent
3cbb74ae
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
common/lib/capa/checker.py
+4
-0
4 additions, 0 deletions
common/lib/capa/checker.py
with
4 additions
and
0 deletions
common/lib/capa/checker.py
+
4
−
0
View file @
9f2bce00
...
...
@@ -11,6 +11,7 @@ import sys
from
cStringIO
import
StringIO
from
calc
import
UndefinedVariable
from
capa_problem
import
LoncapaProblem
logging
.
basicConfig
(
format
=
"
%(levelname)s %(message)s
"
)
...
...
@@ -108,6 +109,9 @@ def check_that_suggested_answers_work(problem):
log
.
debug
(
real_results
)
assert
(
all
(
result
==
'
correct
'
for
answer_id
,
result
in
real_results
.
items
()))
except
UndefinedVariable
as
uv_exc
:
log
.
error
(
"
The variable
\"
{0}
\"
specified in the
"
.
format
(
uv_exc
)
+
"
solution isn
'
t recognized (is it a units measure?).
"
)
except
AssertionError
:
log
.
error
(
"
The following generated answers were not accepted for {0}:
"
.
format
(
problem
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment