How to set self.maxDiff in nose to get full diff output?

前端 未结 6 560
广开言路
广开言路 2020-12-13 23:12

When using nose 1.2.1 with Python 3.3.0, I sometimes get an error message similar to the following one

======================================================         


        
6条回答
  •  鱼传尺愫
    2020-12-13 23:44

    Here you have it (what google told me):

    # http://pdf2djvu.googlecode.com/hg/tests/common.py
    try:
        from nose.tools import assert_multi_line_equal
    except ImportError:
        assert_multi_line_equal = assert_equal
    else:
        assert_multi_line_equal.im_class.maxDiff = None
    

提交回复
热议问题