Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
408b78c0
Commit
408b78c0
authored
Sep 28, 2016
by
Berker Peksag
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #27322: Set sys.path to a temp dir in test_compile_path
parent
eadf443e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
13 deletions
+2
-13
Lib/test/test_compileall.py
Lib/test/test_compileall.py
+2
-13
No files found.
Lib/test/test_compileall.py
View file @
408b78c0
...
...
@@ -103,19 +103,8 @@ class CompileallTests(unittest.TestCase):
force
=
False
,
quiet
=
2
))
def
test_compile_path
(
self
):
# Exclude Lib/test/ which contains invalid Python files like
# Lib/test/badsyntax_pep3120.py
testdir
=
os
.
path
.
realpath
(
os
.
path
.
dirname
(
__file__
))
if
testdir
in
sys
.
path
:
self
.
addCleanup
(
setattr
,
sys
,
'path'
,
sys
.
path
)
sys
.
path
=
list
(
sys
.
path
)
try
:
sys
.
path
.
remove
(
testdir
)
except
ValueError
:
pass
self
.
assertTrue
(
compileall
.
compile_path
(
quiet
=
2
))
with
test
.
test_importlib
.
util
.
import_state
(
path
=
[
self
.
directory
]):
self
.
assertTrue
(
compileall
.
compile_path
(
quiet
=
2
))
with
test
.
test_importlib
.
util
.
import_state
(
path
=
[
self
.
directory
]):
self
.
add_bad_source_file
()
...
...
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