Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
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
9876c993
Commit
9876c993
authored
11 years ago
by
Alexander Kryklia
Browse files
Options
Downloads
Patches
Plain Diff
Fix test for isnan student answer.
parent
2653e963
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
common/lib/capa/capa/tests/test_responsetypes.py
+6
-4
6 additions, 4 deletions
common/lib/capa/capa/tests/test_responsetypes.py
with
6 additions
and
4 deletions
common/lib/capa/capa/tests/test_responsetypes.py
+
6
−
4
View file @
9876c993
...
...
@@ -649,7 +649,7 @@ class StringResponseTest(ResponseTest):
def
test_case_sensitive
(
self
):
# Test single answer
problem_specified
=
self
.
build_problem
(
answer
=
"
Second
"
,
case_sensitive
=
True
)
# should also be case_sensitive if case sensitivity is not specified
problem_not_specified
=
self
.
build_problem
(
answer
=
"
Second
"
)
problems
=
[
problem_specified
,
problem_not_specified
]
...
...
@@ -1105,11 +1105,13 @@ class NumericalResponseTest(ResponseTest):
with
self
.
assertRaises
(
StudentInputError
):
problem
.
grade_answers
(
input_dict
)
# test isnan variable
# test isnan student input: no exception,
# but problem should be graded as incorrect
problem
=
self
.
build_problem
(
answer
=
'
(1, 5)
'
)
input_dict
=
{
'
1_2_1
'
:
''
}
with
self
.
assertRaises
(
StudentInputError
):
problem
.
grade_answers
(
input_dict
)
correct_map
=
problem
.
grade_answers
(
input_dict
)
correctness
=
correct_map
.
get_correctness
(
'
1_2_1
'
)
self
.
assertEqual
(
correctness
,
'
incorrect
'
)
# test invalid range tolerance answer
with
self
.
assertRaises
(
StudentInputError
):
...
...
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