Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
c37a9e3e
Commit
c37a9e3e
authored
Jul 11, 2013
by
JonahStanley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactored problem_setup to use retry_on_exception
parent
b4036c66
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
12 deletions
+7
-12
lms/djangoapps/courseware/features/problems_setup.py
+7
-12
No files found.
lms/djangoapps/courseware/features/problems_setup.py
View file @
c37a9e3e
...
...
@@ -313,18 +313,13 @@ def assert_checked(problem_type, choices):
all_choices
=
[
'choice_0'
,
'choice_1'
,
'choice_2'
,
'choice_3'
]
for
this_choice
in
all_choices
:
attempt
=
0
while
attempt
<
5
:
try
:
element
=
world
.
css_find
(
inputfield
(
problem_type
,
choice
=
this_choice
))
if
this_choice
in
choices
:
assert
element
.
checked
else
:
assert
not
element
.
checked
break
except
:
attempt
+=
1
assert_true
(
attempt
<
5
,
"Could not access {}"
.
format
(
element
))
def
check_problem
():
element
=
world
.
css_find
(
inputfield
(
problem_type
,
choice
=
this_choice
))
if
this_choice
in
choices
:
assert
element
.
checked
else
:
assert
not
element
.
checked
world
.
retry_on_exception
(
check_problem
)
def
assert_textfield
(
problem_type
,
expected_text
,
input_num
=
1
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment