___________________________ test_run_runtime_warning ___________________________
def test_run_runtime_warning():
# need to run stochastic (to trigger the problem in the first place) and at a
# big enough time step to trigger the warning but not too big, else the matrix
# really is wrong. Doesn't seem the most robust test to future scipy whims.
ftest = minimal_ghg_run(stochastic_run=True, timestep=27)
# I want a warning (Idlewild; 2005)
with pytest.warns(RuntimeWarning):
ftest.run(suppress_warnings=False)
# I don't want a warning
with warnings.catch_warnings():
warnings.simplefilter("error")
> ftest.run(suppress_warnings=True)
tests/unit_tests/fair_test.py:241:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
src/fair/fair.py:1555: in run
for i_timepoint in tqdm(
venv/lib/python3.12/site-packages/tqdm/asyncio.py:24: in __init__
super(tqdm_asyncio, self).__init__(iterable, *args, **kwargs)
venv/lib/python3.12/site-packages/tqdm/std.py:1099: in __init__
self.refresh(lock_args=self.lock_args)
venv/lib/python3.12/site-packages/tqdm/std.py:1348: in refresh
self.display()
venv/lib/python3.12/site-packages/tqdm/std.py:1496: in display
self.sp(self.__str__() if msg is None else msg)
venv/lib/python3.12/site-packages/tqdm/std.py:1152: in __str__
return self.format_meter(**self.format_dict)
py3.12 at the moment does not seem to be compatible with
tqdm
and possiblyxarray
known issue: https://github.com/tqdm/tqdm/issues/1517
output failing test in
fair
with py3.12:On hold until
tdqm
is updated.