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
2919389d
Commit
2919389d
authored
Aug 27, 2012
by
kimth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use os.path.join -- all of them...
parent
7c5879a1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
common/lib/xmodule/xmodule/tests/__init__.py
+5
-4
No files found.
common/lib/xmodule/xmodule/tests/__init__.py
View file @
2919389d
...
...
@@ -295,7 +295,8 @@ class CodeResponseTest(unittest.TestCase):
Simple test of whether LoncapaProblem knows when it's been queued
'''
problem_file
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
"test_files/coderesponse.xml"
)
test_lcp
=
lcp
.
LoncapaProblem
(
open
(
problem_file
)
.
read
(),
'1'
,
system
=
i4xs
)
with
open
(
problem_file
)
as
input_file
:
test_lcp
=
lcp
.
LoncapaProblem
(
input_file
.
read
(),
'1'
,
system
=
i4xs
)
answer_ids
=
sorted
(
test_lcp
.
get_question_answers
()
.
keys
())
num_answers
=
len
(
answer_ids
)
...
...
@@ -321,7 +322,7 @@ class CodeResponseTest(unittest.TestCase):
'''
Test whether LoncapaProblem.update_score can deliver queued result to the right subproblem
'''
problem_file
=
os
.
path
.
dirname
(
__file__
)
+
"/test_files/coderesponse.xml"
problem_file
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
"test_files/coderesponse.xml"
)
test_lcp
=
lcp
.
LoncapaProblem
(
open
(
problem_file
)
.
read
(),
'1'
,
system
=
i4xs
)
answer_ids
=
sorted
(
test_lcp
.
get_question_answers
()
.
keys
())
...
...
@@ -377,7 +378,7 @@ class CodeResponseTest(unittest.TestCase):
'''
Test whether the LoncapaProblem knows about the time of queue requests
'''
problem_file
=
os
.
path
.
dirname
(
__file__
)
+
"/test_files/coderesponse.xml"
problem_file
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
"test_files/coderesponse.xml"
)
test_lcp
=
lcp
.
LoncapaProblem
(
open
(
problem_file
)
.
read
(),
'1'
,
system
=
i4xs
)
answer_ids
=
sorted
(
test_lcp
.
get_question_answers
()
.
keys
())
...
...
@@ -411,7 +412,7 @@ class CodeResponseTest(unittest.TestCase):
'''
Test whether file objects are converted to filenames without altering other structures
'''
problem_file
=
os
.
path
.
dirname
(
__file__
)
+
"/test_files/coderesponse.xml"
problem_file
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
"test_files/coderesponse.xml"
)
fp
=
open
(
problem_file
)
answers_with_file
=
{
'1_2_1'
:
'String-based answer'
,
'1_3_1'
:
[
'answer1'
,
'answer2'
,
'answer3'
],
...
...
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