对熊猫进行测试

时间:2012-09-11 22:58:52

标签: nosetests

我尝试关注pandas文档。安装在Ubuntu 10.4上,但运行时测试结果为0测试

~$ nosetests pandas

----------------------------------------------------------------------
Ran 0 tests in 0.002s

OK

似乎一切都安装正确,所以不知道该怎么做或如何解释(我是鼻子测试的新手)。 你能帮我解释输出或建议我应该如何运行这个测试

感谢

1 个答案:

答案 0 :(得分:0)

我在尝试的每个目录中都收到了运行0测试消息,直到我尝试了这个:

/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pandas-0.11.0-py2.7-macosx-10.6-intel.egg/pandas/tests$ sudo nosetests *

sudo是必要的,以摆脱第一轮的访问错误。然后我收到了这些错误:

======================================================================
FAIL: test_cast_internals (pandas.tests.test_frame.TestDataFrame)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pandas-0.11.0-py2.7-macosx-10.6-intel.egg/pandas/tests/test_frame.py", line 9092, in test_cast_internals
    assert_frame_equal(casted, expected)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pandas-0.11.0-py2.7-macosx-10.6-intel.egg/pandas/util/testing.py", line 250, in assert_frame_equal
    assert(left.columns.names == right.columns.names)
AssertionError

======================================================================
FAIL: test_constructor_from_items (pandas.tests.test_frame.TestDataFrame)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pandas-0.11.0-py2.7-macosx-10.6-intel.egg/pandas/tests/test_frame.py", line 2765, in test_constructor_from_items
    assert_frame_equal(recons, self.frame)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pandas-0.11.0-py2.7-macosx-10.6-intel.egg/pandas/util/testing.py", line 250, in assert_frame_equal
    assert(left.columns.names == right.columns.names)
AssertionError

======================================================================
FAIL: test_constructor_more (pandas.tests.test_frame.TestDataFrame)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pandas-0.11.0-py2.7-macosx-10.6-intel.egg/pandas/tests/test_frame.py", line 2565, in test_constructor_more
    tm.assert_frame_equal(dm, self.frame)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pandas-0.11.0-py2.7-macosx-10.6-intel.egg/pandas/util/testing.py", line 250, in assert_frame_equal
    assert(left.columns.names == right.columns.names)
AssertionError

======================================================================
FAIL: test_constructor_orient (pandas.tests.test_frame.TestDataFrame)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pandas-0.11.0-py2.7-macosx-10.6-intel.egg/pandas/tests/test_frame.py", line 2713, in test_constructor_orient
    assert_frame_equal(recons, expected)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pandas-0.11.0-py2.7-macosx-10.6-intel.egg/pandas/util/testing.py", line 249, in assert_frame_equal
    assert(left.index.names == right.index.names)
AssertionError

======================================================================
FAIL: test_constructor_subclass_dict (pandas.tests.test_frame.TestDataFrame)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pandas-0.11.0-py2.7-macosx-10.6-intel.egg/pandas/tests/test_frame.py", line 2267, in test_constructor_subclass_dict
    assert_frame_equal(self.frame.sort_index(), frame)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pandas-0.11.0-py2.7-macosx-10.6-intel.egg/pandas/util/testing.py", line 249, in assert_frame_equal
    assert(left.index.names == right.index.names)
AssertionError

======================================================================
FAIL: test_getitem_fancy_2d (pandas.tests.test_frame.TestDataFrame)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pandas-0.11.0-py2.7-macosx-10.6-intel.egg/pandas/tests/test_frame.py", line 620, in test_getitem_fancy_2d
    assert_frame_equal(ix[:, :2], f.reindex(columns=['A', 'B']))
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pandas-0.11.0-py2.7-macosx-10.6-intel.egg/pandas/util/testing.py", line 250, in assert_frame_equal
    assert(left.columns.names == right.columns.names)
AssertionError

======================================================================
FAIL: test_getitem_fancy_boolean (pandas.tests.test_frame.TestDataFrame)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pandas-0.11.0-py2.7-macosx-10.6-intel.egg/pandas/tests/test_frame.py", line 1106, in test_getitem_fancy_boolean
    assert_frame_equal(result, expected)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pandas-0.11.0-py2.7-macosx-10.6-intel.egg/pandas/util/testing.py", line 250, in assert_frame_equal
    assert(left.columns.names == right.columns.names)
AssertionError

======================================================================
FAIL: test_time_series_plot_color_with_empty_kwargs (pandas.tests.test_graphics.TestDataFrameGroupByPlots)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pandas-0.11.0-py2.7-macosx-10.6-intel.egg/pandas/tests/test_graphics.py", line 752, in test_time_series_plot_color_with_empty_kwargs
    self.assert_(line_colors == ['b', 'g', 'r'])
AssertionError: False is not true

----------------------------------------------------------------------
Ran 3382 tests in 341.290s

FAILED (SKIP=46, failures=8)