Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testfailures with 1.4.1 #276

Closed
pylint-bot opened this issue Dec 3, 2015 · 5 comments
Closed

Testfailures with 1.4.1 #276

pylint-bot opened this issue Dec 3, 2015 · 5 comments
Labels

Comments

@pylint-bot
Copy link

Originally reported by: BitBucket: jlec, GitHub: @jlec?


Happens with all Cpython and pypy

#!python

test_from_imports (unittest_brain.SixBrainTest) ... FAIL

======================================================================
FAIL: test_from_imports (unittest_brain.SixBrainTest)
----------------------------------------------------------------------
Traceback (most recent call last)
  File "/usr/lib64/python3.4/unittest/case.py", line 58, in testPartExecutor
    yield
['__class__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__le__', '__lt__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', 'clear', 'f_back', 'f_builtins', 'f_code', 'f_globals', 'f_lasti', 'f_lineno', 'f_locals', 'f_trace'] == 'unittest_brain'

    ------------------------ local variables -------------------------
    exc_info: None
    isTest: True
    old_success: True
    self: <unittest.case._Outcome object at 0x7fd03a713d68>
      self.errors: [(<unittest_brain.SixBrainTest testMethod=test_from_imports>, None), (<unittest_brain.SixBrainTest testMethod=test_from_imports>, (<class 'AssertionError'>, AssertionError("YES is not an instance of <class 'astroid.scoped_nodes.ClassDef'>",), <traceback object at 0x7fd038222948>)), (<unittest_brain.SixBrainTest testMethod=test_from_imports>, None)]
      self.expectedFailure: None
      self.expecting_failure: False
      self.result: <logilab.common.pytest.SkipAwareTestResult run=21 errors=0 failures=0>
      self.result_supports_subtests: True
      self.skipped: []
      self.success: False
    test_case: <unittest_brain.SixBrainTest testMethod=test_from_imports>
    ------------------------------------------------------------------

  File "/usr/lib64/python3.4/unittest/case.py", line 577, in run
    testMethod()
['__class__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__le__', '__lt__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', 'clear', 'f_back', 'f_builtins', 'f_code', 'f_globals', 'f_lasti', 'f_lineno', 'f_locals', 'f_trace'] == 'unittest_brain'

    ------------------------ local variables -------------------------
    expecting_failure: False
    orig_result: <logilab.common.pytest.SkipAwareTestResult run=21 errors=0 failures=0>
    outcome: <unittest.case._Outcome object at 0x7fd03a713d68>
    result: <logilab.common.pytest.SkipAwareTestResult run=21 errors=0 failures=0>
    self: <unittest_brain.SixBrainTest testMethod=test_from_imports>
      self._cleanups: []
      self._outcome: <unittest.case._Outcome object at 0x7fd03a713d68>
      self._subtest: None
      self._testMethodDoc: None
      self._testMethodName: 'test_from_imports'
      self._type_equality_funcs: {<class 'str'>: 'assertMultiLineEqual', <class 'dict'>: 'assertDictEqual', <class 'set'>: 'assertSetEqual', <class 'tuple'>: 'assertTupleEqual', <class 'frozenset'>: 'assertSetEqual', <class 'list'>: 'assertListEqual'}
    testMethod: <bound method SixBrainTest.test_from_imports of <unittest_brain.SixBrainTest testMethod=test_from_imports>>
    ------------------------------------------------------------------

  File "/var/tmp/portage/dev-python/astroid-1.4.1/work/astroid-1.4.1-python3_4/build/lib/astroid/tests/unittest_brain.py", line 276, in test_from_imports
    self.assertIsInstance(inferred, nodes.ClassDef)
['__class__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__le__', '__lt__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', 'clear', 'f_back', 'f_builtins', 'f_code', 'f_globals', 'f_lasti', 'f_lineno', 'f_locals', 'f_trace'] == 'unittest_brain'

    ------------------------ local variables -------------------------
    ast_node: <Attribute(HTTPSConnection) l.3 [] at 0x7fd03814e358>
    inferred: YES
    self: <unittest_brain.SixBrainTest testMethod=test_from_imports>
      self._cleanups: []
      self._outcome: <unittest.case._Outcome object at 0x7fd03a713d68>
      self._subtest: None
      self._testMethodDoc: None
      self._testMethodName: 'test_from_imports'
      self._type_equality_funcs: {<class 'str'>: 'assertMultiLineEqual', <class 'dict'>: 'assertDictEqual', <class 'set'>: 'assertSetEqual', <class 'tuple'>: 'assertTupleEqual', <class 'frozenset'>: 'assertSetEqual', <class 'list'>: 'assertListEqual'}
    ------------------------------------------------------------------

  File "/usr/lib64/python3.4/unittest/case.py", line 1213, in assertIsInstance
    self.fail(self._formatMessage(msg, standardMsg))
['__class__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__le__', '__lt__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', 'clear', 'f_back', 'f_builtins', 'f_code', 'f_globals', 'f_lasti', 'f_lineno', 'f_locals', 'f_trace'] == 'unittest_brain'

    ------------------------ local variables -------------------------
    cls: <class 'astroid.scoped_nodes.ClassDef'>
    msg: None
    obj: YES
    self: <unittest_brain.SixBrainTest testMethod=test_from_imports>
      self._cleanups: []
      self._outcome: <unittest.case._Outcome object at 0x7fd03a713d68>
      self._subtest: None
      self._testMethodDoc: None
      self._testMethodName: 'test_from_imports'
      self._type_equality_funcs: {<class 'str'>: 'assertMultiLineEqual', <class 'dict'>: 'assertDictEqual', <class 'set'>: 'assertSetEqual', <class 'tuple'>: 'assertTupleEqual', <class 'frozenset'>: 'assertSetEqual', <class 'list'>: 'assertListEqual'}
    standardMsg: "YES is not an instance of <class 'astroid.scoped_nodes.ClassDef'>"
    ------------------------------------------------------------------

  File "/usr/lib64/python3.4/unittest/case.py", line 642, in fail
    raise self.failureException(msg)
['__class__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__le__', '__lt__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', 'clear', 'f_back', 'f_builtins', 'f_code', 'f_globals', 'f_lasti', 'f_lineno', 'f_locals', 'f_trace'] == 'unittest_brain'

    ------------------------ local variables -------------------------
    msg: "YES is not an instance of <class 'astroid.scoped_nodes.ClassDef'>"
    self: <unittest_brain.SixBrainTest testMethod=test_from_imports>
      self._cleanups: []
      self._outcome: <unittest.case._Outcome object at 0x7fd03a713d68>
      self._subtest: None
      self._testMethodDoc: None
      self._testMethodName: 'test_from_imports'
      self._type_equality_funcs: {<class 'str'>: 'assertMultiLineEqual', <class 'dict'>: 'assertDictEqual', <class 'set'>: 'assertSetEqual', <class 'tuple'>: 'assertTupleEqual', <class 'frozenset'>: 'assertSetEqual', <class 'list'>: 'assertListEqual'}
    ------------------------------------------------------------------

AssertionError: YES is not an instance of <class 'astroid.scoped_nodes.ClassDef'>

                              no stdout
                              no stderr
======================================================================

@pylint-bot
Copy link
Author

Original comment by BitBucket: ceridwenv, GitHub: @ceridwen:


I can't replicate this failure. Can you give us some more information about what conditions you're seeing the failure under?

@pylint-bot
Copy link
Author

Original comment by BitBucket: jlec, GitHub: @jlec?:


Okay, the original report happened when running pytest.

Using the new unittest way I see

#!python

python -m unittest discover -p "unittest*.py" --verbose
....
test_from_imports (astroid.tests.unittest_brain.SixBrainTest) ... FAIL

======================================================================
FAIL: test_from_imports (astroid.tests.unittest_brain.SixBrainTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "astroid/tests/unittest_brain.py", line 276, in test_from_imports
    self.assertIsInstance(inferred, nodes.ClassDef)
AssertionError: YES is not an instance of <class 'astroid.scoped_nodes.ClassDef'>

----------------------------------------------------------------------
Ran 495 tests in 10.969s

@pylint-bot
Copy link
Author

Original comment by BitBucket: jlec, GitHub: @jlec?:


The whole thing is when I am running the test suite during installation on a Gentoo Linux system.

@pylint-bot
Copy link
Author

Original comment by BitBucket: ceridwenv, GitHub: @ceridwen:


Can you check that six is installed correctly for the Python interpreter you're using? If it is, try running:

from six.moves import http_client
http_client.HTTPSConnection

and describe what happens.

@PCManticore
Copy link
Contributor

Closing for now, since we can't reproduce it. If you manage to reproduce this issue with the current master version (the future 1.5.0), please reopen it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants