Skip to content

Commit b860a02

Browse files
committed
Adds tests for the utils module
1 parent d62795e commit b860a02

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

mplaltair/tests/test_utils.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import pytest
2+
import pandas as pd
3+
from vega_datasets import data
4+
5+
from mplaltair import _utils
6+
7+
def test_get_format():
8+
assert _utils._get_format(data.cars.url) == 'json'
9+
10+
def test_fetch_success():
11+
assert type(_utils._fetch(data.cars.url)) == pd.DataFrame
12+
13+
def test_fetch_error():
14+
with pytest.raises(NotImplementedError):
15+
_utils._fetch('https://test.tld/dataset.tsv')

0 commit comments

Comments
 (0)