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
75307b25
Commit
75307b25
authored
Dec 08, 2014
by
Ned Batchelder
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #32 from edx/ned/fix-test-for-reprd-exception
Fix a test to allow for the exception to be repr'd.
parents
4e1d1922
cd062558
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletions
+6
-1
codejail/tests/test_safe_exec.py
+6
-1
No files found.
codejail/tests/test_safe_exec.py
View file @
75307b25
...
@@ -79,7 +79,12 @@ class SafeExecTests(unittest.TestCase):
...
@@ -79,7 +79,12 @@ class SafeExecTests(unittest.TestCase):
raise ValueError("That's not how you pour soup!")
raise ValueError("That's not how you pour soup!")
"""
),
globs
)
"""
),
globs
)
msg
=
str
(
what_happened
.
exception
)
msg
=
str
(
what_happened
.
exception
)
self
.
assertIn
(
"ValueError: That's not how you pour soup!"
,
msg
)
# The result may be repr'd or not, so the backslash needs to be
# optional in this match.
self
.
assertRegexpMatches
(
msg
,
r"ValueError: That\\?'s not how you pour soup!"
)
def
test_extra_files
(
self
):
def
test_extra_files
(
self
):
globs
=
{}
globs
=
{}
...
...
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