Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Matrix
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Operate
Environments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Matrix
Commits
4f6fa981
Commit
4f6fa981
authored
9 years ago
by
Mark Haines
Browse files
Options
Downloads
Patches
Plain Diff
Make 'setup.py test' run tox
parent
3cab86a1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
setup.cfg
+0
-3
0 additions, 3 deletions
setup.cfg
setup.py
+26
-1
26 additions, 1 deletion
setup.py
tox.ini
+1
-1
1 addition, 1 deletion
tox.ini
with
27 additions
and
5 deletions
setup.cfg
+
0
−
3
View file @
4f6fa981
...
...
@@ -3,9 +3,6 @@ source-dir = docs/sphinx
build-dir
=
docs/build
all_files
=
1
[aliases]
test
=
trial
[trial]
test_suite
=
tests
...
...
This diff is collapsed.
Click to expand it.
setup.py
+
26
−
1
View file @
4f6fa981
...
...
@@ -16,7 +16,8 @@
import
glob
import
os
from
setuptools
import
setup
,
find_packages
from
setuptools
import
setup
,
find_packages
,
Command
import
sys
here
=
os
.
path
.
abspath
(
os
.
path
.
dirname
(
__file__
))
...
...
@@ -37,6 +38,28 @@ def exec_file(path_segments):
exec
(
code
,
result
)
return
result
class
Tox
(
Command
):
user_options
=
[(
'
tox-args=
'
,
'
a
'
,
"
Arguments to pass to tox
"
)]
def
initialize_options
(
self
):
self
.
tox_args
=
None
def
finalize_options
(
self
):
self
.
test_args
=
[]
self
.
test_suite
=
True
def
run
(
self
):
#import here, cause outside the eggs aren't loaded
import
tox
import
shlex
args
=
self
.
tox_args
if
args
:
args
=
shlex
.
split
(
self
.
tox_args
)
errno
=
tox
.
cmdline
(
args
=
args
)
sys
.
exit
(
errno
)
version
=
exec_file
((
"
synapse
"
,
"
__init__.py
"
))[
"
__version__
"
]
dependencies
=
exec_file
((
"
synapse
"
,
"
python_dependencies.py
"
))
long_description
=
read_file
((
"
README.rst
"
,))
...
...
@@ -52,4 +75,6 @@ setup(
zip_safe
=
False
,
long_description
=
long_description
,
scripts
=
[
"
synctl
"
]
+
glob
.
glob
(
"
scripts/*
"
),
tests_require
=
[
'
tox
'
],
cmdclass
=
{
'
test
'
:
Tox
},
)
This diff is collapsed.
Click to expand it.
tox.ini
+
1
−
1
View file @
4f6fa981
...
...
@@ -9,7 +9,7 @@ deps =
setenv
=
PYTHONDONTWRITEBYTECODE
=
no_byte_code
commands
=
coverage
run
--source
=
./
synapse {envbindir}/trial {posargs:tests}
coverage
run
--source
=
synapse {envbindir}/trial {posargs:tests}
coverage
report
-m
install_command
=
pip
install
--process-dependency-links
--pre
{opts}
{packages}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment