mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-06-14 15:25:15 +02:00
migrate misc_tests to pytest
This commit is contained in:
parent
3695763a5d
commit
f95fff1f78
1 changed files with 3 additions and 4 deletions
|
|
@ -1,20 +1,19 @@
|
|||
from __future__ import print_function
|
||||
import numpy as np
|
||||
import scipy as sp
|
||||
import GPy
|
||||
import warnings
|
||||
|
||||
|
||||
class MiscTests(np.testing.TestCase):
|
||||
class TestMisc:
|
||||
"""
|
||||
Testing some utilities of misc
|
||||
"""
|
||||
|
||||
def setUp(self):
|
||||
def setup(self):
|
||||
self._lim_val = np.finfo(np.float64).max
|
||||
self._lim_val_exp = np.log(self._lim_val)
|
||||
|
||||
def test_safe_exp_upper(self):
|
||||
self.setup()
|
||||
with warnings.catch_warnings(record=True) as w:
|
||||
warnings.simplefilter("always") # always print
|
||||
assert np.isfinite(np.exp(self._lim_val_exp))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue