Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
postpic
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LabAstro
postpic
Commits
deef6cd7
Commit
deef6cd7
authored
Jan 17, 2019
by
Stephan Kuschel
Browse files
Options
Downloads
Patches
Plain Diff
cleaner code in run-tests.py
parent
856cb648
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
run-tests.py
+14
-15
14 additions, 15 deletions
run-tests.py
with
14 additions
and
15 deletions
run-tests.py
+
14
−
15
View file @
deef6cd7
...
...
@@ -60,38 +60,37 @@ def run_alltests(python='python', fast=False, skip_setup=False):
'''
runs all tests on postpic. This function has to exit without error on every commit!
'''
python
+=
'
'
cmdrpl
=
dict
(
python
=
python
)
# make sure .pyx sources are up to date and compiled
if
not
skip_setup
:
runcmd
(
python
+
'
setup.py develop --user
'
)
runcmd
(
'
{
python
}
setup.py develop --user
'
.
format
(
**
cmdrpl
)
)
# find pep8 or pycodestyle (its successor)
pycodestylecmd
=
None
try
:
import
pep8
pycodestyle
cmd
=
'
pep8
'
cmdrpl
[
'
pycodestyle
'
]
=
'
pep8
'
except
(
ImportError
):
pass
try
:
import
pycodestyle
pycodestyle
cmd
=
'
pycodestyle
'
cmdrpl
[
'
pycodestyle
'
]
=
'
pycodestyle
'
except
(
ImportError
):
pass
if
not
pycodestyle
cmd
:
if
'
pycodestyle
'
not
in
cmdrpl
:
raise
ImportError
(
'
Install pep8 or pycodestyle (its successor)
'
)
cmds
=
[
python
+
'
-m nose --exe
'
,
python
+
'
-m
'
+
pycodestylecmd
+
'
postpic --statistics --count --show-source
'
'
--ignore=W391,E123,E226,E24,W504 --max-line-length=99
'
]
cmdo
=
[
python
+
'
setup.py build_sphinx
'
,
python
+
os
.
path
.
join
(
'
examples
'
,
'
simpleexample.py
'
),
python
+
os
.
path
.
join
(
'
examples
'
,
'
particleshapedemo.py
'
),
python
+
os
.
path
.
join
(
'
examples
'
,
'
time_cythonfunctions.py
'
),
python
+
os
.
path
.
join
(
'
examples
'
,
'
openPMD.py
'
)]
cmds
=
[
'
{
python
} -m {pycodestyle} postpic --statistics --count --show-source
'
'
--ignore=W391,E123,E226,E24,W504 --max-line-length=99
'
,
'
{python} -m nose --exe
'
]
cmdo
=
[
'
{
python
}
setup.py build_sphinx
'
,
'
{
python
}
'
+
os
.
path
.
join
(
'
examples
'
,
'
simpleexample.py
'
),
'
{
python
}
'
+
os
.
path
.
join
(
'
examples
'
,
'
particleshapedemo.py
'
),
'
{
python
}
'
+
os
.
path
.
join
(
'
examples
'
,
'
time_cythonfunctions.py
'
),
'
{
python
}
'
+
os
.
path
.
join
(
'
examples
'
,
'
openPMD.py
'
)]
if
not
fast
:
cmds
+=
cmdo
for
cmd
in
cmds
:
runcmd
(
cmd
)
runcmd
(
cmd
.
format
(
**
cmdrpl
)
)
def
main
():
import
argparse
...
...
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