setup.py and test suite of pylint 0.23.0 have incompatible assumptions.
setup.py places modules converted by 2to3 into build/lib directory (by default),
but other files used by test suite aren't placed in that directory.

$ PYTHONPATH="build/lib" pytest -v
====================  test_func_sample_config.py  ====================
unhandled exception occurred while testing test_func_sample_config
Traceback (most recent call last):
  File "/usr/lib64/python3.1/site-packages/logilab/common/pytest.py", line 429, 
in testfile
    options=self.options, outstream=sys.stderr)
  File "/usr/lib64/python3.1/site-packages/logilab/common/pytest.py", line 765, 
in __init__
    testLoader=NonStrictTestLoader())
  File "/usr/lib64/python3.1/site-packages/unittest2/main.py", line 77, in 
__init__
    self.module = __import__(module)
  File "test_func_sample_config.py", line 20, in <module>
    from test_func import *
  File "test_func.py", line 103
    except Exception, ex:
                    ^
SyntaxError: invalid syntax
...
$ PYTHONPATH="build/lib" pytest -v -t build/lib/pylint/test
...
======================================================================
ERROR: test_same_file_1 (unittest_pyreverse_writer.DotWriterTC)
----------------------------------------------------------------------
Traceback (most recent call last)
  File 
"/var/tmp/portage/dev-python/pylint-0.23.0/work/pylint-0.23.0-3.1/build/lib/pylint/test/utils.py",
 line 170, in <lambda>
    lambda self, index=i: self._test_same_file(index))
['__class__', '__delattr__', '__doc__', '__eq__', '__format__', '__ge__', 
'__getattribute__', '__gt__', '__hash__', '__init__', '__le__', '__lt__', 
'__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', 
'__sizeof__', '__str__', '__subclasshook__', 'f_back', 'f_builtins', 'f_code', 
'f_globals', 'f_lasti', 'f_lineno', 'f_locals', 'f_trace'] == 
'unittest_pyreverse_writer'

    ------------------------ local variables -------------------------
    index: 1
    self: <unittest_pyreverse_writer.DotWriterTC testMethod=test_same_file_1>
      self._TestCase__exc_info: <built-in function exc_info>
      self._TestCase__testMethodName: 'test_same_file_1'
      self._cleanups: []
      self._current_test_descr: None
      self._options_: <Values at 0xefb950: {'profile': None, 'exitfirst': 
False, 'tags_pattern': None, 'dbc': False, 'skipped': None, 'testdir': 
'build/lib/pylint/test', 'pdb': None, 'restart': False}>
      self._resultForDoCleanups: None
      self._testMethodDoc: None
      self._testMethodName: 'test_same_file_1'
      self._type_equality_funcs: <unittest2.case._TypeEqualityDict object at 
0xbc93e90>
      self.expected_files: 
['/var/tmp/portage/dev-python/pylint-0.23.0/work/pylint-0.23.0-3.1/build/lib/pylint/test/data/packages_No_Name.dot',
 
'/var/tmp/portage/dev-python/pylint-0.23.0/work/pylint-0.23.0-3.1/build/lib/pylint/test/data/classes_No_Name.dot']
    ------------------------------------------------------------------

  File 
"/var/tmp/portage/dev-python/pylint-0.23.0/work/pylint-0.23.0-3.1/build/lib/pylint/test/utils.py",
 line 156, in _test_same_file
    expected = _sorted_file(expected_file)
['__class__', '__delattr__', '__doc__', '__eq__', '__format__', '__ge__', 
'__getattribute__', '__gt__', '__hash__', '__init__', '__le__', '__lt__', 
'__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', 
'__sizeof__', '__str__', '__subclasshook__', 'f_back', 'f_builtins', 'f_code', 
'f_globals', 'f_lasti', 'f_lineno', 'f_locals', 'f_trace'] == 
'unittest_pyreverse_writer'

    ------------------------ local variables -------------------------
    expected_file: 
'/var/tmp/portage/dev-python/pylint-0.23.0/work/pylint-0.23.0-3.1/build/lib/pylint/test/data/classes_No_Name.dot'
    generated: '"4" -> "8" [arrowtail="node", style="dashed", 
arrowhead="empty"];\n"4" [shape="record", label="{Ancestor|attr : 
str\\lcls_member\\l|set_value()\\lget_value()\\l}"];\n"5" -> "4" 
[arrowtail="none", arrowhead="empty"];\n"5" [shape="record", 
label="{Specialization|relation\\ltop : str\\lTYPE : str\\l|}"];\n"8" 
[shape="record", 
label="{«interface»\\nInterface|\\l|get_value()\\lset_value()\\l}"];\n"9" -> 
"4" [arrowhead="diamond", style="solid", arrowtail="none", fontcolor="green", 
label="cls_member"];\n"9" -> "5" [arrowhead="diamond", style="solid", 
arrowtail="none", fontcolor="green", label="relation"];\n"9" [shape="record", 
label="{DoNothing|\\l|}"];\ncharset="utf-8"\ndigraph "classes_No_Name" 
{\nrankdir=BT\n}'
    generated_file: 'classes_No_Name.dot'
    index: 1
    self: <unittest_pyreverse_writer.DotWriterTC testMethod=test_same_file_1>
      self._TestCase__exc_info: <built-in function exc_info>
      self._TestCase__testMethodName: 'test_same_file_1'
      self._cleanups: []
      self._current_test_descr: None
      self._options_: <Values at 0xefb950: {'profile': None, 'exitfirst': 
False, 'tags_pattern': None, 'dbc': False, 'skipped': None, 'testdir': 
'build/lib/pylint/test', 'pdb': None, 'restart': False}>
      self._resultForDoCleanups: None
      self._testMethodDoc: None
      self._testMethodName: 'test_same_file_1'
      self._type_equality_funcs: <unittest2.case._TypeEqualityDict object at 
0xbc93e90>
      self.expected_files: 
['/var/tmp/portage/dev-python/pylint-0.23.0/work/pylint-0.23.0-3.1/build/lib/pylint/test/data/packages_No_Name.dot',
 
'/var/tmp/portage/dev-python/pylint-0.23.0/work/pylint-0.23.0-3.1/build/lib/pylint/test/data/classes_No_Name.dot']
    ------------------------------------------------------------------

  File 
"/var/tmp/portage/dev-python/pylint-0.23.0/work/pylint-0.23.0-3.1/build/lib/pylint/test/utils.py",
 line 108, in _sorted_file
    lines = [line.strip() for line in open(path).readlines()
['__class__', '__delattr__', '__doc__', '__eq__', '__format__', '__ge__', 
'__getattribute__', '__gt__', '__hash__', '__init__', '__le__', '__lt__', 
'__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', 
'__sizeof__', '__str__', '__subclasshook__', 'f_back', 'f_builtins', 'f_code', 
'f_globals', 'f_lasti', 'f_lineno', 'f_locals', 'f_trace'] == 
'unittest_pyreverse_writer'

    ------------------------ local variables -------------------------
    path: 
'/var/tmp/portage/dev-python/pylint-0.23.0/work/pylint-0.23.0-3.1/build/lib/pylint/test/data/classes_No_Name.dot'
    ------------------------------------------------------------------

IOError: [Errno 2] No such file or directory: 
'/var/tmp/portage/dev-python/pylint-0.23.0/work/pylint-0.23.0-3.1/build/lib/pylint/test/data/classes_No_Name.dot'

                              no stdout                               
                              no stderr                               
==========================  test_format.py  ==========================
test_known_values_all_1 (test_format.ChecklineFunctionTest) ... ok
test_known_values_colonnl_10 (test_format.ChecklineFunctionTest) ... ok
test_known_values_colonnl_2 (test_format.ChecklineFunctionTest) ... ok
test_known_values_colonnl_3 (test_format.ChecklineFunctionTest) ... ok
test_known_values_colonnl_4 (test_format.ChecklineFunctionTest) ... ok
test_known_values_colonnl_5 (test_format.ChecklineFunctionTest) ... ok
test_known_values_colonnl_6 (test_format.ChecklineFunctionTest) ... ok
test_known_values_colonnl_7 (test_format.ChecklineFunctionTest) ... ok
test_known_values_colonnl_9 (test_format.ChecklineFunctionTest) ... ok
test_known_values_commaspace_1 (test_format.ChecklineFunctionTest) ... ok
test_known_values_commaspace_2 (test_format.ChecklineFunctionTest) ... ok
test_known_values_commaspace_3 (test_format.ChecklineFunctionTest) ... ok
test_known_values_commaspace_4 (test_format.ChecklineFunctionTest) ... ok
test_known_values_instring_1 (test_format.ChecklineFunctionTest) ... ok
test_known_values_instring_2 (test_format.ChecklineFunctionTest) ... ok
test_known_values_opspace_1 (test_format.ChecklineFunctionTest) ... ok
test_known_values_opspace_2 (test_format.ChecklineFunctionTest) ... ok
test_known_values_opspace_3 (test_format.ChecklineFunctionTest) ... ok
test_known_values_opspace_4 (test_format.ChecklineFunctionTest) ... ok
test_known_values_tastring (test_format.ChecklineFunctionTest) ... ok
test_known_values_tqstring (test_format.ChecklineFunctionTest) ... ok
test_known_values_1 (test_format.StringRgxTest) ... ok
test_known_values_10 (test_format.StringRgxTest) ... ok
test_known_values_11 (test_format.StringRgxTest) ... ok
test_known_values_2 (test_format.StringRgxTest) ... ok
test_known_values_5 (test_format.StringRgxTest) ... ok
test_known_values_6 (test_format.StringRgxTest) ... ok
test_known_values_7 (test_format.StringRgxTest) ... ok
test_known_values_8 (test_format.StringRgxTest) ... ok
test_known_values_9 (test_format.StringRgxTest) ... ok
test_known_values_ta_1 (test_format.StringRgxTest) ... ok
test_known_values_ta_2 (test_format.StringRgxTest) ... ok
test_known_values_tq_1 (test_format.StringRgxTest) ... ok
test_known_values_tq_2 (test_format.StringRgxTest) ... ok
test_no_crash (test_format.StringRgxTest) ... SKIPPED
ok

======================================================================
SKIPPED: test_no_crash (test_format.StringRgxTest)
        XXX: explain the test, remove it or assert something
=========================  unittest_lint.py  =========================
test_pylint_home (unittest_lint.ConfigTC) ... ok
test_pylintrc (unittest_lint.ConfigTC) ... ok
test_pylintrc_parentdir (unittest_lint.ConfigTC) ... ok
test_pylintrc_parentdir_no_package (unittest_lint.ConfigTC) ... ok
test (unittest_lint.GetNoteMessageTC) ... ok
test_disable_alot (unittest_lint.PyLinterTC)
check that we disabled a lot of checkers ... ok
test_disable_similar (unittest_lint.PyLinterTC) ... unittest_lint.py:244: 
DeprecationWarning: Please use assertFalse instead.
  self.failIf('similarities' in [c.name for c in 
self.linter.prepare_checkers()])
ok
test_enable_checkers (unittest_lint.PyLinterTC) ... unittest_lint.py:227: 
DeprecationWarning: Please use assertFalse instead.
  self.failIf('design' in [c.name for c in self.linter.prepare_checkers()])
unittest_lint.py:229: DeprecationWarning: Please use assertTrue instead.
  self.failUnless('design' in [c.name for c in self.linter.prepare_checkers()])
ok
test_enable_message (unittest_lint.PyLinterTC) ... ok
test_enable_message_block (unittest_lint.PyLinterTC) ... ok
test_enable_message_category (unittest_lint.PyLinterTC) ... ok
test_enable_report (unittest_lint.PyLinterTC) ... ok
test_errors_only (unittest_lint.PyLinterTC) ... unittest_lint.py:238: 
DeprecationWarning: Please use assertFalse instead.
  self.failIf(any(name in checker_names for name in should_not))
ok
test_lint_ext_module_with_file_output (unittest_lint.PyLinterTC) ... ok
test_list_messages (unittest_lint.PyLinterTC) ... ok
test_message_help (unittest_lint.PyLinterTC) ... ok
test_set_option_1 (unittest_lint.PyLinterTC) ... ok
test_set_option_2 (unittest_lint.PyLinterTC) ... ok
test (unittest_lint.SortMessagesTC) ... ok

*******************************************************************************
Ran 733 test cases in 35.07s (32.58s CPU), 469 errors, 10 failures, 10 skipped
5 modules OK (6 failed)
failures: 
/var/tmp/portage/dev-python/pylint-0.23.0/work/pylint-0.23.0-3.1/build/lib/pylint/test/test_func_sample_config
 [232/320], 
/var/tmp/portage/dev-python/pylint-0.23.0/work/pylint-0.23.0-3.1/build/lib/pylint/test/smoketest
 [2/13], 
/var/tmp/portage/dev-python/pylint-0.23.0/work/pylint-0.23.0-3.1/build/lib/pylint/test/test_regr
 [9/14], 
/var/tmp/portage/dev-python/pylint-0.23.0/work/pylint-0.23.0-3.1/build/lib/pylint/test/test_func
 [232/320], 
/var/tmp/portage/dev-python/pylint-0.23.0/work/pylint-0.23.0-3.1/build/lib/pylint/test/test_similar
 [2/4], 
/var/tmp/portage/dev-python/pylint-0.23.0/work/pylint-0.23.0-3.1/build/lib/pylint/test/unittest_pyreverse_writer
 [2/6]
$ find "$(pwd)" -name classes_No_Name.dot
/var/tmp/portage/dev-python/pylint-0.23.0/work/pylint-0.23.0-3.1/test/data/classes_No_Name.dot

-- 
Arfrever Frehtes Taifersar Arahesis

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Python-Projects mailing list
[email protected]
http://lists.logilab.org/mailman/listinfo/python-projects

Reply via email to