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
045e0916
Commit
045e0916
authored
Jun 06, 2013
by
Ned Batchelder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change how we import codejail into the tests.
parent
5fb5fa06
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
codejail/tests/test_safe_exec.py
+4
-4
No files found.
codejail/tests/test_safe_exec.py
View file @
045e0916
...
...
@@ -5,7 +5,7 @@ import textwrap
import
unittest
from
nose.plugins.skip
import
SkipTest
from
codejail
.safe_exec
import
safe_exec
,
not_safe_exec
,
SafeExecException
from
codejail
import
safe_exec
class
SafeExecTests
(
unittest
.
TestCase
):
...
...
@@ -71,7 +71,7 @@ class SafeExecTests(unittest.TestCase):
def
test_raising_exceptions
(
self
):
globs
=
{}
with
self
.
assertRaises
(
SafeExecException
)
as
what_happened
:
with
self
.
assertRaises
(
safe_exec
.
SafeExecException
)
as
what_happened
:
self
.
safe_exec
(
textwrap
.
dedent
(
"""
\
raise ValueError("That's not how you pour soup!")
"""
),
globs
)
...
...
@@ -85,7 +85,7 @@ class TestSafeExec(SafeExecTests, unittest.TestCase):
__test__
=
True
def
safe_exec
(
self
,
*
args
,
**
kwargs
):
safe_exec
(
*
args
,
**
kwargs
)
safe_exec
.
safe_exec
(
*
args
,
**
kwargs
)
class
TestNotSafeExec
(
SafeExecTests
,
unittest
.
TestCase
):
...
...
@@ -100,4 +100,4 @@ class TestNotSafeExec(SafeExecTests, unittest.TestCase):
raise
SkipTest
def
safe_exec
(
self
,
*
args
,
**
kwargs
):
not_safe_exec
(
*
args
,
**
kwargs
)
safe_exec
.
not_safe_exec
(
*
args
,
**
kwargs
)
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