Run python virtualenv tests

Virtualenv’s test suite is small and not yet at all comprehensive, The easy way to run tests (handles test dependencies automatically):

python setup.py test ( # did not work so ignore )

To run only a selection of the tests, run them directly with pytest instead. Create a virtualenv, and install required packages:

pip install pytest #mock ( I loaded all instead of just mock )

Run pytest:

pytest

Running test-suite for pandas refer : http://pandas.pydata.org/pandas-docs/stable/install.html#running-the-test-suite

http://pandas.pydata.org/pandas-docs/stable/install.html#running-the-test-suite
>>> import pandas as pd
>>> pd.test()

It gives following error ( Install nose ):

ImportError: Need nose >= 1.0.0 for tests - see http://somethingaboutorange.com/mrl/projects/nose

Install nose:

pip install nose

Result of pip freeze ; alert ( # alert is an alias in some distros, I changed it for my needs )

adium-theme-ubuntu==0.3.4
nose==1.3.7
numpy==1.11.1
pandas==0.18.1
py==1.4.31
pytest==3.0.2
python-dateutil==2.5.3
pytz==2016.6.1
six==1.10.0
unity-lens-photos==1.0
virtualenv==15.0.3

Results of pandas tests :

Running unit tests for pandas
pandas version 0.18.1
numpy version 1.11.1
pandas is installed in /home/xerius/PYTHON/Py_12/local/lib/python2.7/site-packages/pandas
Python version 2.7.12 (default, Jul 1 2016, 15:12:24) [GCC 5.4.0 20160609]
nose version 1.3.7
/home/xerius/PYTHON/Py_12/local/lib/python2.7/site-packages/nose/importer.py:94: FutureWarning: The pandas.rpy module is deprecated and will be removed in a future version. We refer to external packages like rpy2. 
See here for a guide on how to port your code to rpy2: http://pandas.pydata.org/pandas-docs/stable/r_interface.html
 mod = load_module(part_fqname, fh, filename, desc)
S..SS..SS..SS..SS..SS..SS..SS..SSSSSSSSSSSSSS..SS..SS..SSSS...........SS..SS..SS..SS..SS..SS................SSSSSSSSSSSSSSSS..SS..SS.........
.............................................................................................................................................
.............................................................................................................................................
....................................................................................................................................................................................................................................................................................................
======================================================================
FAIL: test_normalize_tz (pandas.tseries.tests.test_timezones.TestTimeZones)
----------------------------------------------------------------------
Traceback (most recent call last):
 File "/home/xerius/PYTHON/Py_12/local/lib/python2.7/site-packages/pandas/tseries/tests/test_timezones.py", line 1289, in test_normalize_tz
 self.assertTrue(result.is_normalized)
AssertionError: False is not true

----------------------------------------------------------------------
Ran 9252 tests in 319.725s

FAILED (SKIP=612, failures=1)

Test NumPy :

>>> import numpy
>>> numpy.test('full')

Results of  NumPy tests :

Running unit tests for numpy
NumPy version 1.11.1
NumPy relaxed strides checking option: False
NumPy is installed in /home/xerius/PYTHON/Py_12/local/lib/python2.7/site-packages/numpy
Python version 2.7.12 (default, Jul  1 2016, 15:12:24) [GCC 5.4.0 20160609]
nose version 1.3.7
.........................................................................................S..SS...SSS.KKK......................
.........................................................................................S..SS...SSS.KKK......................
.........................................................................................................
----------------------------------------------------------------------
Ran 5976 tests in 323.274s

OK (KNOWNFAIL=6, SKIP=34)

Install scipy :

pip install scipy

Test SciPy :

>>> import scipy
>>> scipy.test('full')

Results of  SciPy tests :

Running unit tests for scipy
NumPy version 1.11.1
NumPy relaxed strides checking option: False
NumPy is installed in /home/xerius/PYTHON/Py_12/local/lib/python2.7/site-packages/numpy
SciPy version 0.18.0
SciPy is installed in /home/xerius/PYTHON/Py_12/local/lib/python2.7/site-packages/scipy
Python version 2.7.12 (default, Jul  1 2016, 15:12:24) [GCC 5.4.0 20160609]
nose version 1.3.7
/home/xerius/PYTHON/Py_12/local/lib/python2.7/site-packages/numpy/lib/utils.py:99: DeprecationWarning: `scipy.weave` is deprecated, use `weave` instead!
  warnings.warn(depdoc, DeprecationWarning)
........S.S....................................................................................................................................................................
........S.S....................................................................................................................................................................
.........................................................................................................................................................................................................................................................................................................................................................................................................................../home/xerius/PYTHON/Py_12/local/lib/python2.7/site-packages/scipy/stats/stats.py:1268: RuntimeWarning: invalid value encountered in absolute
 return SkewtestResult(Z, 2 * distributions.norm.sf(np.abs(Z)))
/home/xerius/PYTHON/Py_12/local/lib/python2.7/site-packages/scipy/stats/stats.py:1347: RuntimeWarning: invalid value encountered in absolute
 return KurtosistestResult(Z, 2 * distributions.norm.sf(np.abs(Z)))
/home/xerius/PYTHON/Py_12/local/lib/python2.7/site-packages/scipy/stats/stats.py:1268: RuntimeWarning: invalid value encountered in absolute
 return SkewtestResult(Z, 2 * distributions.norm.sf(np.abs(Z)))
/home/xerius/PYTHON/Py_12/local/lib/python2.7/site-packages/scipy/stats/stats.py:1347: RuntimeWarning: invalid value encountered in absolute
 return KurtosistestResult(Z, 2 * distributions.norm.sf(np.abs(Z)))
.....................................................K......................................................................................................
----------------------------------------------------------------------
Ran 24552 tests in 949.277s

OK (KNOWNFAIL=97, SKIP=2030)

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s