You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enh: updated tests to be less strict / more robust.
We had spurious/random test failures with travis because there had other warnings generated.
(see for instance: https://travis-ci.org/savoirfairelinux/influxdb-python/jobs/59929464)
Unfortunately we couldn't reproduce.
So this just changed the assert to be less strict:
search for the expected message/warning in the rec_warnings list.
example of the failure:
======================================================================
FAIL: Tests warning for an invalid bulk size.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/travis/build/savoirfairelinux/influxdb-python/tests/influxdb/influxdb08/helper_test.py", line 172, in testWarnBulkSizeZero
.format(WarnBulkSizeZero, '\n'.join(map(str, w))))
nose.proxy.AssertionError: 5 != 1 : <class 'tests.influxdb.influxdb08.helper_test.WarnBulkSizeZero'> call should have generated one warning.Actual generated warnings: {message : UserWarning('Definition of bulk_size in WarnBulkSizeZero forced to 1, was less than 1.',), category : 'UserWarning', filename : '/home/travis/build/savoirfairelinux/influxdb-python/influxdb/influxdb08/helper.py', lineno : 79, line : None}
{message : ResourceWarning('unclosed <socket.socket object at 0x0000000005c63820>',), category : 'ResourceWarning', filename : '/home/travis/build/savoirfairelinux/influxdb-python/.tox/pypy3/lib-python/3/os.py', lineno : 477, line : None}
{message : ResourceWarning('unclosed <socket.socket object at 0x0000000005e1ace0>',), category : 'ResourceWarning', filename : '/home/travis/build/savoirfairelinux/influxdb-python/.tox/pypy3/lib-python/3/os.py', lineno : 477, line : None}
{message : ResourceWarning('unclosed <socket.socket object at 0x0000000005e1b100>',), category : 'ResourceWarning', filename : '/home/travis/build/savoirfairelinux/influxdb-python/.tox/pypy3/lib-python/3/os.py', lineno : 477, line : None}
{message : ResourceWarning('unclosed <socket.socket object at 0x0000000005e1b130>',), category : 'ResourceWarning', filename : '/home/travis/build/savoirfairelinux/influxdb-python/.tox/pypy3/lib-python/3/os.py', lineno : 477, line : None}
0 commit comments