Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maunium
synapse
Commits
e721a7f2
Commit
e721a7f2
authored
8 years ago
by
Richard van der Hoff
Browse files
Options
Downloads
Patches
Plain Diff
Implement a null 'test' command
parent
af32d3b7
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
setup.py
+15
-2
15 additions, 2 deletions
setup.py
with
15 additions
and
2 deletions
setup.py
+
15
−
2
View file @
e721a7f2
...
@@ -16,10 +16,13 @@
...
@@ -16,10 +16,13 @@
import
glob
import
glob
import
os
import
os
from
setuptools
import
setup
,
find_packages
from
setuptools
import
setup
,
find_packages
,
Command
import
sys
import
sys
here
=
os
.
path
.
abspath
(
os
.
path
.
dirname
(
__file__
))
# Some notes on `setup.py test`:
# Some notes on `setup.py test`:
#
#
# Once upon a time we used to try to make `setup.py test` run `tox` to run the
# Once upon a time we used to try to make `setup.py test` run `tox` to run the
...
@@ -45,10 +48,19 @@ import sys
...
@@ -45,10 +48,19 @@ import sys
#
#
# [1]: http://tox.readthedocs.io/en/2.5.0/example/basic.html#integration-with-setup-py-test-command
# [1]: http://tox.readthedocs.io/en/2.5.0/example/basic.html#integration-with-setup-py-test-command
# [2]: https://pypi.python.org/pypi/setuptools_trial
# [2]: https://pypi.python.org/pypi/setuptools_trial
class
TestCommand
(
Command
):
user_options
=
[]
def
initialize_options
(
self
):
pass
here
=
os
.
path
.
abspath
(
os
.
path
.
dirname
(
__file__
))
def
finalize_options
(
self
):
pass
def
run
(
self
):
print
(
"""
Synapse
'
s tests cannot be run via setup.py. To run them, try:
PYTHONPATH=
"
.
"
trial tests
"""
)
def
read_file
(
path_segments
):
def
read_file
(
path_segments
):
"""
Read a file from the package. Takes a list of strings to join to
"""
Read a file from the package. Takes a list of strings to join to
...
@@ -81,4 +93,5 @@ setup(
...
@@ -81,4 +93,5 @@ setup(
zip_safe
=
False
,
zip_safe
=
False
,
long_description
=
long_description
,
long_description
=
long_description
,
scripts
=
[
"
synctl
"
]
+
glob
.
glob
(
"
scripts/*
"
),
scripts
=
[
"
synctl
"
]
+
glob
.
glob
(
"
scripts/*
"
),
cmdclass
=
{
'
test
'
:
TestCommand
},
)
)
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