-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Logger test failures when pytest-qt is installed #7572
Copy link
Copy link
Closed
Labels
Description
There is a pytest plugin called pytest-qt that is used by some packages - one of the side effect it has on all packages is to fail if there is any output printed to stderr during the test phase. There are a couple of failures in astropy that happen when pytest-qt is installed - this is more annoying than serious but it'd still be good to track down why these happen, and whether they can be safely ignored.
============================================================================== FAILURES ===============================================================================
_______________________________________________________________________ test_exception_logging ________________________________________________________________________
CALL ERROR: Qt exceptions in virtual methods:
________________________________________________________________________________
Traceback (most recent call last):
File "/private/var/folders/zy/t1l3sx310d3d6p0kyxqzlrnr0000gr/T/astropy-test-1izlslk0/lib/python3.6/site-packages/astropy/tests/test_logger.py", line 205, in test_exception_logging
raise Exception("This is an Exception")
Exception: This is an Exception
________________________________________________________________________________
Traceback (most recent call last):
File "/private/var/folders/zy/t1l3sx310d3d6p0kyxqzlrnr0000gr/T/astropy-test-1izlslk0/lib/python3.6/site-packages/astropy/tests/test_logger.py", line 217, in test_exception_logging
raise Exception("This is an Exception")
Exception: This is an Exception
________________________________________________________________________________
Traceback (most recent call last):
File "/private/var/folders/zy/t1l3sx310d3d6p0kyxqzlrnr0000gr/T/astropy-test-1izlslk0/lib/python3.6/site-packages/astropy/tests/test_logger.py", line 232, in test_exception_logging
raise Exception("This is an Exception")
Exception: This is an Exception
________________________________________________________________________________
------------------------------------------------------------------------ Captured stderr call -------------------------------------------------------------------------
Qt exceptions in virtual methods:
________________________________________________________________________________
Traceback (most recent call last):
File "/private/var/folders/zy/t1l3sx310d3d6p0kyxqzlrnr0000gr/T/astropy-test-1izlslk0/lib/python3.6/site-packages/astropy/tests/test_logger.py", line 205, in test_exception_logging
raise Exception("This is an Exception")
Exception: This is an Exception
________________________________________________________________________________
ERROR: Exception: This is an Exception [astropy.tests.test_logger]
Qt exceptions in virtual methods:
________________________________________________________________________________
Traceback (most recent call last):
File "/private/var/folders/zy/t1l3sx310d3d6p0kyxqzlrnr0000gr/T/astropy-test-1izlslk0/lib/python3.6/site-packages/astropy/tests/test_logger.py", line 217, in test_exception_logging
raise Exception("This is an Exception")
Exception: This is an Exception
________________________________________________________________________________
Qt exceptions in virtual methods:
________________________________________________________________________________
Traceback (most recent call last):
File "/private/var/folders/zy/t1l3sx310d3d6p0kyxqzlrnr0000gr/T/astropy-test-1izlslk0/lib/python3.6/site-packages/astropy/tests/test_logger.py", line 232, in test_exception_logging
raise Exception("This is an Exception")
Exception: This is an Exception
________________________________________________________________________________
-------------------------------------------------------------------------- Captured log call --------------------------------------------------------------------------
logger.py 259 ERROR Exception: This is an Exception
____________________________________________________________________ test_exception_logging_origin ____________________________________________________________________
CALL ERROR: Qt exceptions in virtual methods:
________________________________________________________________________________
Traceback (most recent call last):
File "/private/var/folders/zy/t1l3sx310d3d6p0kyxqzlrnr0000gr/T/astropy-test-1izlslk0/lib/python3.6/site-packages/astropy/tests/test_logger.py", line 252, in test_exception_logging_origin
l.append('foo')
File "/private/var/folders/zy/t1l3sx310d3d6p0kyxqzlrnr0000gr/T/astropy-test-1izlslk0/lib/python3.6/site-packages/astropy/utils/collections.py", line 47, in append
self._assert(x)
File "/private/var/folders/zy/t1l3sx310d3d6p0kyxqzlrnr0000gr/T/astropy-test-1izlslk0/lib/python3.6/site-packages/astropy/utils/collections.py", line 31, in _assert
"type '{}'".format(self._types))
TypeError: homogeneous list must contain only objects of type '<class 'int'>'
________________________________________________________________________________
------------------------------------------------------------------------ Captured stderr call -------------------------------------------------------------------------
ERROR: TypeError: homogeneous list must contain only objects of type '<class 'int'>' [astropy.utils.collections]
Qt exceptions in virtual methods:
________________________________________________________________________________
Traceback (most recent call last):
File "/private/var/folders/zy/t1l3sx310d3d6p0kyxqzlrnr0000gr/T/astropy-test-1izlslk0/lib/python3.6/site-packages/astropy/tests/test_logger.py", line 252, in test_exception_logging_origin
l.append('foo')
File "/private/var/folders/zy/t1l3sx310d3d6p0kyxqzlrnr0000gr/T/astropy-test-1izlslk0/lib/python3.6/site-packages/astropy/utils/collections.py", line 47, in append
self._assert(x)
File "/private/var/folders/zy/t1l3sx310d3d6p0kyxqzlrnr0000gr/T/astropy-test-1izlslk0/lib/python3.6/site-packages/astropy/utils/collections.py", line 31, in _assert
"type '{}'".format(self._types))
TypeError: homogeneous list must contain only objects of type '<class 'int'>'
________________________________________________________________________________
-------------------------------------------------------------------------- Captured log call --------------------------------------------------------------------------
logger.py 259 ERROR TypeError: homogeneous list must contain only objects of type '<class 'int'>'
Reactions are currently unavailable