Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PyFstat
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
Model registry
Operate
Environments
Monitor
Incidents
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
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Pep Covas Vidal
PyFstat
Commits
d569dc90
Commit
d569dc90
authored
Aug 1, 2019
by
Gregory Ashton
Browse files
Options
Downloads
Plain Diff
Merge branch 'make-tests-more-robust' into 'master'
Make tests more robust See merge request
GregAshton/PyFstat!21
parents
e976b57c
367e4a02
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
pyfstat/tcw_fstat_map_funcs.py
+2
-5
2 additions, 5 deletions
pyfstat/tcw_fstat_map_funcs.py
setup.py
+0
-1
0 additions, 1 deletion
setup.py
tests.py
+4
-7
4 additions, 7 deletions
tests.py
with
6 additions
and
13 deletions
pyfstat/tcw_fstat_map_funcs.py
+
2
−
5
View file @
d569dc90
...
...
@@ -31,11 +31,8 @@ def _optional_import(modulename, shorthand=None):
logging
.
debug
(
"
Successfully imported module %s%s.
"
%
(
modulename
,
shorthandbit
))
success
=
True
except
ImportError
as
e
:
if
e
.
message
==
"
No module named
"
+
modulename
:
logging
.
debug
(
"
No module {:s} found.
"
.
format
(
modulename
))
logging
.
debug
(
"
Failed to import module {:s}.
"
.
format
(
modulename
))
success
=
False
else
:
raise
return
success
...
...
This diff is collapsed.
Click to expand it.
setup.py
+
0
−
1
View file @
d569dc90
...
...
@@ -31,6 +31,5 @@ setup(
"
bashplotlib
"
,
"
peakutils
"
,
"
pathos
"
,
"
pycuda
"
,
],
)
This diff is collapsed.
Click to expand it.
tests.py
+
4
−
7
View file @
d569dc90
...
...
@@ -5,7 +5,7 @@ import shutil
import
pyfstat
import
lalpulsar
import
logging
import
time
class
Test
(
unittest
.
TestCase
):
outdir
=
"
TestData
"
...
...
@@ -85,6 +85,7 @@ class Writer(Test):
Writer
.
run_makefakedata
()
time_second
=
os
.
path
.
getmtime
(
Writer
.
sftfilepath
)
self
.
assertTrue
(
time_first
==
time_second
)
time
.
sleep
(
1
)
# make sure timestamp is actually different!
os
.
system
(
"
touch {}
"
.
format
(
Writer
.
config_file_name
))
Writer
.
run_makefakedata
()
time_third
=
os
.
path
.
getmtime
(
Writer
.
sftfilepath
)
...
...
@@ -550,12 +551,8 @@ class GridSearch(Test):
tref
=
self
.
tref
,
Lambda0
=
[
30
,
0
,
0
,
0
],
)
search
.
run
()
self
.
assertTrue
(
os
.
path
.
isfile
(
"
{}/{}_slice_projection.png
"
.
format
(
search
.
outdir
,
search
.
label
)
)
)
fig
,
axes
=
search
.
run
(
save
=
False
)
self
.
assertTrue
(
fig
is
not
None
)
def
test_glitch_grid_search
(
self
):
search
=
pyfstat
.
GridGlitchSearch
(
...
...
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