Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
codejail
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
codejail
Commits
c0836d16
Commit
c0836d16
authored
May 23, 2013
by
Ned Batchelder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Lint improvements.
parent
062b4c55
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
codejail/tests/test_jail_code.py
+1
-1
codejail/tests/test_json_safe.py
+2
-2
No files found.
codejail/tests/test_jail_code.py
View file @
c0836d16
...
@@ -215,7 +215,7 @@ class TestLimits(JailCodeHelpers, unittest.TestCase):
...
@@ -215,7 +215,7 @@ class TestLimits(JailCodeHelpers, unittest.TestCase):
self
.
assertResultOk
(
res
)
self
.
assertResultOk
(
res
)
self
.
assertEqual
(
res
.
stdout
,
"10
\n
"
)
self
.
assertEqual
(
res
.
stdout
,
"10
\n
"
)
#
But i
f we try to read all of it, we'll be killed by the real-time limit.
#
I
f we try to read all of it, we'll be killed by the real-time limit.
res
=
jailpy
(
code
=
"x = open('/dev/random').read(); print 'Done!'"
)
res
=
jailpy
(
code
=
"x = open('/dev/random').read(); print 'Done!'"
)
self
.
assertNotEqual
(
res
.
status
,
0
)
self
.
assertNotEqual
(
res
.
status
,
0
)
...
...
codejail/tests/test_json_safe.py
View file @
c0836d16
...
@@ -36,7 +36,7 @@ class JsonSafeTest(unittest.TestCase):
...
@@ -36,7 +36,7 @@ class JsonSafeTest(unittest.TestCase):
unicode_char
=
unichr
(
code
)
unicode_char
=
unichr
(
code
)
# Try it as a dictionary value
# Try it as a dictionary value
result
=
json_safe
({
'test'
:
unicode_char
})
json_safe
({
'test'
:
unicode_char
})
# Different json libraries treat these bad Unicode characters
# Different json libraries treat these bad Unicode characters
# differently. All we care about is that no error is raised from
# differently. All we care about is that no error is raised from
# json_safe.
# json_safe.
...
@@ -49,7 +49,7 @@ class JsonSafeTest(unittest.TestCase):
...
@@ -49,7 +49,7 @@ class JsonSafeTest(unittest.TestCase):
unicode_char
=
unichr
(
code
)
unicode_char
=
unichr
(
code
)
# Try it is a dictionary key
# Try it is a dictionary key
result
=
json_safe
({
unicode_char
:
'test'
})
json_safe
({
unicode_char
:
'test'
})
# Different json libraries treat these bad Unicode characters
# Different json libraries treat these bad Unicode characters
# differently. All we care about is that no error is raised from
# differently. All we care about is that no error is raised from
# json_safe.
# json_safe.
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