Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
89642ca5
Commit
89642ca5
authored
May 29, 2011
by
Éric Araujo
Browse files
Options
Browse Files
Download
Plain Diff
Merge touch-ups and fixes for #9831 (+port fix to packaging) and #9223 from 3.2
parents
2c6268e3
a2ce8ffe
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
tests/test_build_py.py
tests/test_build_py.py
+10
-7
No files found.
tests/test_build_py.py
View file @
89642ca5
...
@@ -57,12 +57,15 @@ class BuildPyTestCase(support.TempdirManager,
...
@@ -57,12 +57,15 @@ class BuildPyTestCase(support.TempdirManager,
self
.
assertEqual
(
len
(
cmd
.
get_outputs
()),
3
)
self
.
assertEqual
(
len
(
cmd
.
get_outputs
()),
3
)
pkgdest
=
os
.
path
.
join
(
destination
,
"pkg"
)
pkgdest
=
os
.
path
.
join
(
destination
,
"pkg"
)
files
=
os
.
listdir
(
pkgdest
)
files
=
os
.
listdir
(
pkgdest
)
self
.
assertTrue
(
"__init__.py"
in
files
)
self
.
assertIn
(
"__init__.py"
,
files
)
if
not
sys
.
dont_write_bytecode
:
self
.
assertIn
(
"README.txt"
,
files
)
self
.
assertTrue
(
"__init__.pyc"
in
files
)
# XXX even with -O, distutils writes pyc, not pyo; bug?
self
.
assertTrue
(
"README.txt"
in
files
)
if
sys
.
dont_write_bytecode
:
self
.
assertNotIn
(
"__init__.pyc"
,
files
)
def
test_empty_package_dir
(
self
):
else
:
self
.
assertIn
(
"__init__.pyc"
,
files
)
def
test_empty_package_dir
(
self
):
# See SF 1668596/1720897.
# See SF 1668596/1720897.
cwd
=
os
.
getcwd
()
cwd
=
os
.
getcwd
()
...
@@ -110,7 +113,7 @@ class BuildPyTestCase(support.TempdirManager,
...
@@ -110,7 +113,7 @@ class BuildPyTestCase(support.TempdirManager,
finally
:
finally
:
sys
.
dont_write_bytecode
=
old_dont_write_bytecode
sys
.
dont_write_bytecode
=
old_dont_write_bytecode
self
.
assert
True
(
'byte-compiling is disabled'
in
self
.
logs
[
0
][
1
])
self
.
assert
In
(
'byte-compiling is disabled'
,
self
.
logs
[
0
][
1
])
def
test_suite
():
def
test_suite
():
return
unittest
.
makeSuite
(
BuildPyTestCase
)
return
unittest
.
makeSuite
(
BuildPyTestCase
)
...
...
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