File: usgs_nwis_pytables_test.py

package info (click to toggle)
python-ulmo 0.8.5%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,056 kB
  • sloc: python: 6,550; makefile: 144
file content (17 lines) | stat: -rw-r--r-- 477 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from builtins import str
import pytest

from ulmo.usgs import nwis


def test_pytables_raises_deprecation_warnings(recwarn):
    nwis.pytables.get_sites()
    w = recwarn.pop(DeprecationWarning)
    assert issubclass(w.category, DeprecationWarning)
    assert 'nwis.pytables module has moved' in str(w.message)


def test_hdf5_doesnt_raise_deprecation_warnings(recwarn):
    nwis.hdf5.get_sites()
    with pytest.raises(AssertionError):
        recwarn.pop(DeprecationWarning)