New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mission "clean test logs" - handles all kind of userwarnings/deprecation warnings #1888

Merged
merged 21 commits into from Sep 22, 2017
Commits
Jump to file or symbol
Failed to load files and symbols.
+7 −0
Diff settings

Always

Just for now

Viewing a subset of changes. View all

ignore some "RuntimeWarning: invalid value encountered in sign"

  • Loading branch information...
barsch authored and krischer committed Sep 13, 2017
commit 1b805349670dcaa9ce186f77845f90a1b66168af
@@ -10,6 +10,7 @@
import unittest
import matplotlib.pyplot as plt
import numpy as np
from obspy.core.util.testing import ImageComparison
from obspy.imaging.mopad_wrapper import beach
@@ -23,6 +24,12 @@ class MopadTestCase(unittest.TestCase):
def setUp(self):
# directory where the test files are located
self.path = os.path.join(os.path.dirname(__file__), 'images')
# ignore some "RuntimeWarning: invalid value encountered in sign"
self.nperr = np.geterr()
np.seterr(all='ignore')
def tearDown(self):
np.seterr(**self.nperr)
def test_collection(self):
"""
ProTip! Use n and p to navigate between commits in a pull request.