From f95fff1f783538887c9ad3f531e4a7228cf9af1c Mon Sep 17 00:00:00 2001 From: Martin Bubel Date: Sun, 8 Oct 2023 23:43:26 +0200 Subject: [PATCH] migrate misc_tests to pytest --- GPy/testing/misc_tests.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/GPy/testing/misc_tests.py b/GPy/testing/misc_tests.py index 628b688d..74a6a896 100644 --- a/GPy/testing/misc_tests.py +++ b/GPy/testing/misc_tests.py @@ -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))