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
8b714dc7
Commit
8b714dc7
authored
Mar 28, 2014
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply patch based on patch in 2008 by Klaus Zimmerman. Fixes #176.
parent
0873d471
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
2 deletions
+11
-2
CHANGES.txt
CHANGES.txt
+2
-0
setup.py
setup.py
+1
-0
setuptools/command/test.py
setuptools/command/test.py
+8
-2
No files found.
CHANGES.txt
View file @
8b714dc7
...
...
@@ -9,6 +9,8 @@ CHANGES
* Issue #97: Added experimental support for PEP 420 namespace package
discovery via the ``PEP420PackageFinder.find`` method. This new method will
discover packages for directories lacking an __init__.py module.
* Issue #176: Add parameter to the test command to support a custom test
runner: --test-runner or -r.
---
3.3
...
...
setup.py
View file @
8b714dc7
...
...
@@ -152,6 +152,7 @@ setup_params = dict(
"packages = setuptools.dist:check_packages"
,
"dependency_links = setuptools.dist:assert_string_list"
,
"test_loader = setuptools.dist:check_importable"
,
"test_runner = setuptools.dist:check_importable"
,
"use_2to3 = setuptools.dist:assert_bool"
,
"convert_2to3_doctests = setuptools.dist:assert_string_list"
,
"use_2to3_fixers = setuptools.dist:assert_string_list"
,
...
...
setuptools/command/test.py
View file @
8b714dc7
...
...
@@ -51,12 +51,14 @@ class test(Command):
(
'test-module='
,
'm'
,
"Run 'test_suite' in specified module"
),
(
'test-suite='
,
's'
,
"Test suite to run (e.g. 'some_module.test_suite')"
),
(
'test-runner='
,
'r'
,
"Test runner to use"
),
]
def
initialize_options
(
self
):
self
.
test_suite
=
None
self
.
test_module
=
None
self
.
test_loader
=
None
self
.
test_runner
=
None
def
finalize_options
(
self
):
...
...
@@ -78,6 +80,8 @@ class test(Command):
self
.
test_loader
=
getattr
(
self
.
distribution
,
'test_loader'
,
None
)
if
self
.
test_loader
is
None
:
self
.
test_loader
=
"setuptools.command.test:ScanningLoader"
if
self
.
test_runner
is
None
:
self
.
test_runner
=
getattr
(
self
.
distribution
,
'test_runner'
,
None
)
def
with_project_on_sys_path
(
self
,
func
):
if
sys
.
version_info
>=
(
3
,)
and
getattr
(
self
.
distribution
,
'use_2to3'
,
False
):
...
...
@@ -154,8 +158,10 @@ class test(Command):
loader_ep
=
EntryPoint
.
parse
(
"x="
+
self
.
test_loader
)
loader_class
=
loader_ep
.
load
(
require
=
False
)
cks
=
loader_class
()
runner_ep
=
EntryPoint
.
parse
(
"x="
+
self
.
test_runner
)
runner_class
=
runner_ep
.
load
(
require
=
False
)
unittest
.
main
(
None
,
None
,
[
unittest
.
__file__
]
+
self
.
test_args
,
testLoader
=
cks
testLoader
=
loader_class
(),
testRunner
=
runner_class
(),
)
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