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
cdbcb2b5
Commit
cdbcb2b5
authored
Mar 16, 2014
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use py26compat for skipIf
parent
ddce1ca3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
setuptools/tests/test_find_packages.py
setuptools/tests/test_find_packages.py
+7
-6
No files found.
setuptools/tests/test_find_packages.py
View file @
cdbcb2b5
...
...
@@ -6,6 +6,7 @@ import tempfile
import
unittest
from
setuptools
import
find_packages
from
setuptools.tests.py26compat
import
skipIf
PEP420
=
sys
.
version_info
[:
2
]
>=
(
3
,
3
)
...
...
@@ -62,7 +63,7 @@ class TestFindPackages(unittest.TestCase):
fp
.
close
()
return
path
@
unittest
.
skipIf
(
PEP420
,
'Not a PEP 420 env'
)
@
skipIf
(
PEP420
,
'Not a PEP 420 env'
)
def
test_regular_package
(
self
):
self
.
_touch
(
'__init__.py'
,
self
.
pkg_dir
)
packages
=
find_packages
(
self
.
dist_dir
)
...
...
@@ -86,33 +87,33 @@ class TestFindPackages(unittest.TestCase):
packages
=
find_packages
(
self
.
dist_dir
)
self
.
assertTrue
(
'pkg.some.data'
not
in
packages
)
@
unittest
.
skipIf
(
not
PEP420
,
'PEP 420 only'
)
@
skipIf
(
not
PEP420
,
'PEP 420 only'
)
def
test_pep420_ns_package
(
self
):
packages
=
find_packages
(
self
.
dist_dir
,
include
=
[
'pkg*'
],
exclude
=
[
'pkg.subpkg.assets'
])
self
.
assertEqual
(
packages
,
[
'pkg'
,
'pkg.nspkg'
,
'pkg.subpkg'
])
@
unittest
.
skipIf
(
not
PEP420
,
'PEP 420 only'
)
@
skipIf
(
not
PEP420
,
'PEP 420 only'
)
def
test_pep420_ns_package_no_includes
(
self
):
packages
=
find_packages
(
self
.
dist_dir
,
exclude
=
[
'pkg.subpkg.assets'
])
self
.
assertEqual
(
packages
,
[
'docs'
,
'pkg'
,
'pkg.nspkg'
,
'pkg.subpkg'
])
@
unittest
.
skipIf
(
not
PEP420
,
'PEP 420 only'
)
@
skipIf
(
not
PEP420
,
'PEP 420 only'
)
def
test_pep420_ns_package_no_includes_or_excludes
(
self
):
packages
=
find_packages
(
self
.
dist_dir
)
expected
=
[
'docs'
,
'pkg'
,
'pkg.nspkg'
,
'pkg.subpkg'
,
'pkg.subpkg.assets'
]
self
.
assertEqual
(
packages
,
expected
)
@
unittest
.
skipIf
(
not
PEP420
,
'PEP 420 only'
)
@
skipIf
(
not
PEP420
,
'PEP 420 only'
)
def
test_regular_package_with_nested_pep420_ns_packages
(
self
):
self
.
_touch
(
'__init__.py'
,
self
.
pkg_dir
)
packages
=
find_packages
(
self
.
dist_dir
,
exclude
=
[
'docs'
,
'pkg.subpkg.assets'
])
self
.
assertEqual
(
packages
,
[
'pkg'
,
'pkg.nspkg'
,
'pkg.subpkg'
])
@
unittest
.
skipIf
(
not
PEP420
,
'PEP 420 only'
)
@
skipIf
(
not
PEP420
,
'PEP 420 only'
)
def
test_pep420_ns_package_no_non_package_dirs
(
self
):
shutil
.
rmtree
(
self
.
docs_dir
)
shutil
.
rmtree
(
os
.
path
.
join
(
self
.
dist_dir
,
'pkg/subpkg/assets'
))
...
...
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