You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
as described in #11913 (comment),
when using a development pandas instance, if pandas.test() is called while the working directory of the python interpreter is within the pandas repository, it fails to detect any tests, at least on windows:
[pandas_dev] C:\Users\jahfe_000\Documents\GitHub\pandas>python
Python 2.7.11 |Continuum Analytics, Inc.| (default, Jan 29 2016, 14:26:21) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>> import pandas
>>> pandas.test()
Running unit tests for pandas
pandas version 0.17.1+311.g70f79ce
numpy version 1.10.4
pandas is installed in pandas
Python version 2.7.11 |Continuum Analytics, Inc.| (default, Jan 29 2016, 14:26:21) [MSC v.1500 64 bit (AMD64)]
nose version 1.3.7
----------------------------------------------------------------------
Ran 0 tests in 0.000s
OK
<nose.result.TextTestResult run=0 errors=0 failures=0>
>>>
if using python setup.py develop, a fix is to browse to a folder outside of the repo:
[pandas_dev] C:\Users\jahfe_000\Documents\GitHub\pandas>cd ..
[pandas_dev] C:\Users\jahfe_000\Documents\GitHub>python
Python 2.7.11 |Continuum Analytics, Inc.| (default, Jan 29 2016, 14:26:21) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>> import pandas
>>> pandas.test()
Running unit tests for pandas
pandas version 0.17.1+311.g70f79ce
numpy version 1.10.4
pandas is installed in c:\users\jahfe_000\documents\github\pandas\pandas
Python version 2.7.11 |Continuum Analytics, Inc.| (default, Jan 29 2016, 14:26:21) [MSC v.1500 64 bit (AMD64)]
nose version 1.3.7
C:\Anaconda\envs\pandas_dev\lib\site-packages\matplotlib\backends\qt_compat.py:84: ImportWarning: Not importing directory 'C:\Anaconda\envs\pandas_dev\sip': missing __init__.py
import sip
....................................S..............S..............S..............S.................F.........................................................................................................................................................
This seems to be due to the fact that pandas.__file__ returns a relative path from the package root when accessed from a folder located within the package, and a relative path when accessed from any other directory.
The text was updated successfully, but these errors were encountered:
Well, I tried to fix the problem but I am afraid I have to give up.
First of all, this is pretty hard to debug as I can't reproduce the problem in pycharm, only in the command line interpreter. By increasing the verbosity of the nose test runner pd.test(verbose=4) - This line needs to be modified to allow this - I came to the conclusion that the problem was coming from nose itself, most likely in nose/importer.py. This file uses __file__ and __path__ extensively and must be affected by the absolute/relative path problem.
Unfortunately I haven't managed to track the bug down fully. If someone has experience with nose and module imports they will probably figure this out!
as described in #11913 (comment),
when using a development pandas instance, if
pandas.test()
is called while the working directory of the python interpreter is within the pandas repository, it fails to detect any tests, at least on windows:if using
python setup.py develop
, a fix is to browse to a folder outside of the repo:This seems to be due to the fact that
pandas.__file__
returns a relative path from the package root when accessed from a folder located within the package, and a relative path when accessed from any other directory.The text was updated successfully, but these errors were encountered: