-
Notifications
You must be signed in to change notification settings - Fork 150
/
check_env.py
49 lines (33 loc) · 1.02 KB
/
check_env.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
""" Run this file to check your python installation.
"""
from os.path import dirname, join
HERE = dirname(__file__)
def test_import_pandas():
import pandas
def test_pandas_version():
import pandas
version_found = pandas.__version__.split(".")
version_found = tuple(int(num) for num in version_found)
assert version_found > (0, 15)
def test_import_numpy():
import numpy
def test_import_matplotlib():
import matplotlib.pyplot as plt
plt.figure
plt.plot
plt.legend
plt.imshow
def test_import_statsmodels():
import statsmodels as sm
from statsmodels.formula.api import ols
from statsmodels.tsa.ar_model import AR
def test_read_html():
import pandas
pandas.read_html(join(HERE, "climate_timeseries", "data",
"sea_levels", "Obtaining Tide Gauge Data.html"))
def test_scrape_web():
import pandas as pd
pd.read_html("http://en.wikipedia.org/wiki/World_population")
if __name__ == "__main__":
import nose
nose.run(defaultTest=__name__)