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

Test failures with Python 3.2 and PYTHONWARNINGS="d" #2083

Closed
Arfrever opened this issue Jul 2, 2012 · 1 comment
Closed

Test failures with Python 3.2 and PYTHONWARNINGS="d" #2083

Arfrever opened this issue Jul 2, 2012 · 1 comment
Labels
Milestone

Comments

@Arfrever
Copy link

Arfrever commented Jul 2, 2012

When PYTHONWARNINGS="d" environmental variable is set, then some tests fail with Python 3.2 due to ResourceWarnings triggered by tests:

======================================================================
ERROR: test_startup_ipy (IPython.core.tests.test_profile.ProfileStartupTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/ipython-0.13-r1000/temp/tests-3.2/usr/lib64/python3.2/site-packages/IPython/testing/decorators.py", line 229, in skipper_func
    return f(*args, **kwargs)
  File "/var/tmp/portage/dev-python/ipython-0.13-r1000/temp/tests-3.2/usr/lib64/python3.2/site-packages/IPython/core/tests/test_profile.py", line 118, in test_startup_ipy
    self.validate('test')
  File "/var/tmp/portage/dev-python/ipython-0.13-r1000/temp/tests-3.2/usr/lib64/python3.2/site-packages/IPython/core/tests/test_profile.py", line 107, in validate
    tt.ipexec_validate(self.fname, output, '', options=self.options)
  File "/var/tmp/portage/dev-python/ipython-0.13-r1000/temp/tests-3.2/usr/lib64/python3.2/site-packages/IPython/testing/tools.py", line 262, in ipexec_validate
    (fname, err))
ValueError: Running file '/var/tmp/portage/dev-python/ipython-0.13-r1000/temp/tmpm3zkzw/test.py' produced error: "/var/tmp/portage/dev-python/ipython-0.13-r1000/temp/tests-3.2/usr/lib64/python3.2/site-packages/IPython/utils/py3compat.py:76: ResourceWarning: unclosed file <_io.BufferedReader name='/var/tmp/portage/dev-python/ipython-0.13-r1000/temp/tmpm3zkzw/test.py'>\n  exec(compile(open(fname, 'rb').read(), fname, 'exec'), glob, loc)\n"

======================================================================
ERROR: test_startup_py (IPython.core.tests.test_profile.ProfileStartupTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/ipython-0.13-r1000/temp/tests-3.2/usr/lib64/python3.2/site-packages/IPython/testing/decorators.py", line 229, in skipper_func
    return f(*args, **kwargs)
  File "/var/tmp/portage/dev-python/ipython-0.13-r1000/temp/tests-3.2/usr/lib64/python3.2/site-packages/IPython/core/tests/test_profile.py", line 113, in test_startup_py
    self.validate('123')
  File "/var/tmp/portage/dev-python/ipython-0.13-r1000/temp/tests-3.2/usr/lib64/python3.2/site-packages/IPython/core/tests/test_profile.py", line 107, in validate
    tt.ipexec_validate(self.fname, output, '', options=self.options)
  File "/var/tmp/portage/dev-python/ipython-0.13-r1000/temp/tests-3.2/usr/lib64/python3.2/site-packages/IPython/testing/tools.py", line 262, in ipexec_validate
    (fname, err))
ValueError: Running file '/var/tmp/portage/dev-python/ipython-0.13-r1000/temp/tmpm3zkzw/test.py' produced error: "/var/tmp/portage/dev-python/ipython-0.13-r1000/temp/tests-3.2/usr/lib64/python3.2/site-packages/IPython/utils/py3compat.py:76: ResourceWarning: unclosed file <_io.BufferedReader name='/var/tmp/portage/dev-python/ipython-0.13-r1000/temp/tmpm3zkzw/home_test_dir/.ipython/profile_test/startup/00-start.py'>\n  exec(compile(open(fname, 'rb').read(), fname, 'exec'), glob, loc)\n/var/tmp/portage/dev-python/ipython-0.13-r1000/temp/tests-3.2/usr/lib64/python3.2/site-packages/IPython/utils/py3compat.py:76: ResourceWarning: unclosed file <_io.BufferedReader name='/var/tmp/portage/dev-python/ipython-0.13-r1000/temp/tmpm3zkzw/test.py'>\n  exec(compile(open(fname, 'rb').read(), fname, 'exec'), glob, loc)\n"

======================================================================
ERROR: IPython.core.tests.test_run.TestMagicRunSimple.test_obj_del
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python3.2/site-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/var/tmp/portage/dev-python/ipython-0.13-r1000/temp/tests-3.2/usr/lib64/python3.2/site-packages/IPython/core/tests/test_run.py", line 189, in test_obj_del
    tt.ipexec_validate(self.fname, 'object A deleted', err)
  File "/var/tmp/portage/dev-python/ipython-0.13-r1000/temp/tests-3.2/usr/lib64/python3.2/site-packages/IPython/testing/tools.py", line 262, in ipexec_validate
    (fname, err))
ValueError: Running file '/var/tmp/portage/dev-python/ipython-0.13-r1000/temp/tmpnm9d2n.py' produced error: "/var/tmp/portage/dev-python/ipython-0.13-r1000/temp/tests-3.2/usr/lib64/python3.2/site-packages/IPython/utils/py3compat.py:76: ResourceWarning: unclosed file <_io.BufferedReader name='/var/tmp/portage/dev-python/ipython-0.13-r1000/temp/tmpnm9d2n.py'>\n  exec(compile(open(fname, 'rb').read(), fname, 'exec'), glob, loc)\n"

======================================================================
ERROR: IPython.core.tests.test_run.TestMagicRunSimple.test_tclass
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python3.2/site-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/var/tmp/portage/dev-python/ipython-0.13-r1000/temp/tests-3.2/usr/lib64/python3.2/site-packages/IPython/testing/decorators.py", line 229, in skipper_func
    return f(*args, **kwargs)
  File "/var/tmp/portage/dev-python/ipython-0.13-r1000/temp/tests-3.2/usr/lib64/python3.2/site-packages/IPython/core/tests/test_run.py", line 231, in test_tclass
    tt.ipexec_validate(self.fname, out, err)
  File "/var/tmp/portage/dev-python/ipython-0.13-r1000/temp/tests-3.2/usr/lib64/python3.2/site-packages/IPython/testing/tools.py", line 262, in ipexec_validate
    (fname, err))
ValueError: Running file '/var/tmp/portage/dev-python/ipython-0.13-r1000/temp/tmp0a9rah.ipy' produced error: "/var/tmp/portage/dev-python/ipython-0.13-r1000/temp/tests-3.2/usr/lib64/python3.2/site-packages/IPython/utils/py3compat.py:76: ResourceWarning: unclosed file <_io.BufferedReader name='/var/tmp/portage/dev-python/ipython-0.13-r1000/temp/tests-3.2/usr/lib64/python3.2/site-packages/IPython/core/tests/tclass.py'>\n  exec(compile(open(fname, 'rb').read(), fname, 'exec'), glob, loc)\n"

----------------------------------------------------------------------
Ran 340 tests in 22.876s

FAILED (KNOWNFAIL=1, SKIP=1, errors=4)
**********************************************************************
@fperez
Copy link
Member

fperez commented Jul 2, 2012

Thanks for the report!

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

3 participants