Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
David Keitel
PyFstat
Commits
d952cd3e
Commit
d952cd3e
authored
Jan 30, 2018
by
Gregory Ashton
Browse files
Add warning message (but pass) when errors are encountered in removing test directories
Closes
#12
parent
c896db59
Changes
1
Show whitespace changes
Inline
Side-by-side
tests.py
View file @
d952cd3e
...
...
@@ -4,6 +4,7 @@ import os
import
shutil
import
pyfstat
import
lalpulsar
import
logging
class
Test
(
unittest
.
TestCase
):
...
...
@@ -12,7 +13,11 @@ class Test(unittest.TestCase):
@
classmethod
def
setUpClass
(
self
):
if
os
.
path
.
isdir
(
self
.
outdir
):
try
:
shutil
.
rmtree
(
self
.
outdir
)
except
OSError
:
logging
.
warning
(
"{} not removed prior to tests"
.
format
(
self
.
outdir
))
h0
=
1
sqrtSX
=
1
F0
=
30
...
...
@@ -38,7 +43,11 @@ class Test(unittest.TestCase):
@
classmethod
def
tearDownClass
(
self
):
if
os
.
path
.
isdir
(
self
.
outdir
):
try
:
shutil
.
rmtree
(
self
.
outdir
)
except
OSError
:
logging
.
warning
(
"{} not removed prior to tests"
.
format
(
self
.
outdir
))
class
Writer
(
Test
):
...
...
Write
Preview
Supports
Markdown
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